Skip to content

Commit 71c6f7c

Browse files
committed
Fix eval tests
1 parent f0c0062 commit 71c6f7c

19 files changed

+26
-20
lines changed

plugins/hls-eval-plugin/test/Main.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ tests =
8787
, goldenWithEval "Evaluate expressions in Haddock comments in both single line and multi line format" "THaddock" "hs"
8888
, goldenWithEval "Compare results (for Haddock tests only)" "TCompare" "hs"
8989
, goldenWithEval "Local Modules imports are accessible in a test" "TLocalImport" "hs"
90-
, -- , goldenWithEval "Local Modules can be imported in a test" "TLocalImportInTest" "hs"
91-
expectFailBecause "Unexplained but minor issue" $
92-
goldenWithEval "Setting language option TupleSections" "TLanguageOptionsTupleSections" "hs"
90+
-- , goldenWithEval "Local Modules can be imported in a test" "TLocalImportInTest" "hs"
91+
, goldenWithEval "Setting language option TupleSections" "TLanguageOptionsTupleSections" "hs"
9392
, goldenWithEval ":set accepts ghci flags" "TFlags" "hs"
9493
, goldenWithEval "IO expressions are supported, stdout/stderr output is ignored" "TIO" "hs"
9594
, goldenWithEval "Property checking" "TProperty" "hs"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module T11 where
22

33
-- >>> :kind! a
4-
-- Not in scope: type variable 'a'
4+
-- Not in scope: type variable ‘a’
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module T13 where
22

33
-- >>> :kind a
4-
-- Not in scope: type variable 'a'
4+
-- Not in scope: type variable ‘a’
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module T17 where
22

33
-- >>> :type +no 42
4-
-- parse error on input '+'
4+
-- parse error on input ‘+’
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module T26 where
2-
import T25 ()
2+
import Util ()
33

44
-- >>> "hello"
55
-- "hello"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module T26 where
2-
import T25 ()
2+
import Util ()
33

44
-- >>> "hello"

plugins/hls-eval-plugin/test/testdata/T8.expected.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module T8 where
55
-- Variable not in scope: noFunctionWithThisName
66

77
-- >>> "a" + "bc"
8-
-- No instance for (Num [Char]) arising from a use of '+'
8+
-- No instance for (Num [Char]) arising from a use of ‘+’
99

1010
-- >>> "
1111
-- lexical error in string/character literal at end of input

plugins/hls-eval-plugin/test/testdata/TFlags.expected.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module TFlags where
1818
Options apply only in the section where they are defined (unless they are in the setup section), so this will fail:
1919
2020
>>> class L a b c
21-
Too many parameters for class 'L'
21+
Too many parameters for class ‘L’
2222
(Enable MultiParamTypeClasses to allow multi-parameter classes)
2323
-}
2424

@@ -29,7 +29,7 @@ Options apply to all tests in the same section after their declaration.
2929
Not set yet:
3030
3131
>>> class D
32-
No parameters for class 'D'
32+
No parameters for class ‘D’
3333
(Enable MultiParamTypeClasses to allow no-parameter classes)
3434
3535
Now it works:

plugins/hls-eval-plugin/test/testdata/THaddock.expected.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module THaddock () where
1818
"bc"
1919
-}
2020

21+
double :: Num a => a -> a
2122
double a = a + a
2223
-- ^ Single line backward comments
2324
-- >>> double 11
@@ -37,4 +38,5 @@ twice a = a ++ a
3738
3839
>>> IGNORED as it does not start on the first column
3940
-}
41+
five :: Integer
4042
five = 5

plugins/hls-eval-plugin/test/testdata/THaddock.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ module THaddock () where
1616
>>> "b"++"c"
1717
-}
1818

19+
double :: Num a => a -> a
1920
double a = a + a
2021
-- ^ Single line backward comments
2122
-- >>> double 11
@@ -32,4 +33,5 @@ twice a = a ++ a
3233
3334
>>> IGNORED as it does not start on the first column
3435
-}
36+
five :: Integer
3537
five = 5
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
-- This works fine: {-# LANGUAGE TupleSections #-}
2-
module TLanguageOptionsTupleSection where
2+
module TLanguageOptionsTupleSections where
33

44
-- Why oh why is this not working?
55
-- What is special about TupleSections?
66
-- >>> :set -XTupleSections
77
-- >>> ("a",) "b"
8-
-- ("a","b")
8+
-- ("a","b")
9+

plugins/hls-eval-plugin/test/testdata/TLanguageOptionsTupleSections.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- This works fine: {-# LANGUAGE TupleSections #-}
2-
module TLanguageOptionsTupleSection where
2+
module TLanguageOptionsTupleSections where
33

44
-- Why oh why is this not working?
55
-- What is special about TupleSections?

plugins/hls-eval-plugin/test/testdata/TNested.expected.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module TNseted () where
1+
module TNested () where
22
{-
33
>>> 54
44
54

plugins/hls-eval-plugin/test/testdata/TNested.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module TNseted () where
1+
module TNested () where
22
{-
33
>>> 54
44
{-

plugins/hls-eval-plugin/test/testdata/TPlainComment.expected.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tests are ignored if:
44
* do not start on the first column
55
* are in multi line comments that open and close on the same line
66
-}
7-
module TPlain where
7+
module TPlainComment where
88

99
{- ORMOLU_DISABLE -}
1010

@@ -25,4 +25,5 @@ module TPlain where
2525
2626
>>> IGNORED as it does not start on the first column
2727
-}
28+
five :: Integer
2829
five = 5

plugins/hls-eval-plugin/test/testdata/TPlainComment.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tests are ignored if:
44
* do not start on the first column
55
* are in multi line comments that open and close on the same line
66
-}
7-
module TPlain where
7+
module TPlainComment where
88

99
{- ORMOLU_DISABLE -}
1010

@@ -22,4 +22,5 @@ module TPlain where
2222
2323
>>> IGNORED as it does not start on the first column
2424
-}
25+
five :: Integer
2526
five = 5
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
packages: .
1+
packages: ./
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
cradle:
22
cabal:
3-
- path: "././"
3+
- path: "./"
44
component: "lib:test"

0 commit comments

Comments
 (0)