Skip to content

Commit 9667701

Browse files
committed
Fix eval tests
1 parent 1d2458b commit 9667701

18 files changed

+20
-81
lines changed

plugins/hls-eval-plugin/hls-eval-plugin.cabal

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@ build-type: Simple
1919
extra-source-files:
2020
LICENSE
2121
README.md
22-
test/testdata/*.cabal
2322
test/testdata/*.hs
2423
test/testdata/*.lhs
2524
test/testdata/*.yaml
26-
test/testdata/cabal.project
2725

2826
flag pedantic
2927
description: Enable -Werror

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

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ module TLanguageOptionsTupleSection where
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/TPlainComment.expected.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

plugins/hls-eval-plugin/test/testdata/cabal.project

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
cradle:
2-
cabal:
3-
- path: "././"
4-
component: "lib:test"
2+
direct:
3+
arguments: []

plugins/hls-eval-plugin/test/testdata/test.cabal

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)