File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
plugins/hls-eval-plugin/test Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ tests =
68
68
, goldenWithEval " Refresh an evaluation" " T5" " hs"
69
69
, goldenWithEval " Refresh an evaluation w/ lets" " T6" " hs"
70
70
, goldenWithEval " Refresh a multiline evaluation" " T7" " hs"
71
+ , goldenWithEval " Evaluate a multi-line show result" " TMultiResult" " hs" -- Do not escape from comments!
71
72
, testCase " Semantic and Lexical errors are reported" $ do
72
73
evalInFile " T8.hs" " -- >>> noFunctionWithThisName" " -- Variable not in scope: noFunctionWithThisName"
73
74
evalInFile " T8.hs" " -- >>> res = \" a\" + \" bc\" " $
Original file line number Diff line number Diff line change
1
+ module TMultiResult where
2
+ -- test multiline show instance (see #2907)
3
+
4
+ data Multiline = M { l1 :: String , l2 :: String } deriving Read
5
+
6
+ instance Show Multiline where
7
+ show m = " M {\n l1=" <> show (l1 m) <> " ,\n l2=" <> show (l2 m) <> " \n }"
8
+
9
+ -- >>> M "first line" "second line"
10
+ -- M {
11
+ -- l1="first line",
12
+ -- l2="second line"
13
+ -- }
Original file line number Diff line number Diff line change
1
+ module TMultiResult where
2
+ -- test multiline show instance (see #2907)
3
+
4
+ data Multiline = M { l1 :: String , l2 :: String } deriving Read
5
+
6
+ instance Show Multiline where
7
+ show m = " M {\n l1=" <> show (l1 m) <> " ,\n l2=" <> show (l2 m) <> " \n }"
8
+
9
+ -- >>> M "first line" "second line"
You can’t perform that action at this time.
0 commit comments