File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change 21
21
(require 'purescript-mode )
22
22
(require 'purescript-indentation )
23
23
24
+ (defun purescript-test-indentation-expected-only (expected )
25
+ (with-temp-buffer
26
+ (insert expected)
27
+ (purescript-mode)
28
+ (turn-on-purescript-indentation)
29
+ (indent-region (point-min ) (point-max ))
30
+ (should (string= expected (buffer-string )))))
31
+
24
32
(defun purescript-test-indentation (before after &optional start-line )
25
33
(with-temp-buffer
26
34
(insert before)
@@ -210,15 +218,11 @@ type MyRec = { data :: Number
210
218
211
219
(ert-deftest func-with-do ()
212
220
:expected-result :failed
213
- (purescript-test-indentation "
214
- foo :: Foo
215
- foo = do
216
- pure unit"
217
-
218
- "
221
+ (purescript-test-indentation-expected-only "
219
222
foo :: Foo
220
223
foo = do
221
- pure unit" ))
224
+ pure unit
225
+ " ))
222
226
223
227
(ert-deftest do-bindings ()
224
228
:expected-result :failed
@@ -267,13 +271,7 @@ test3 a
267
271
(ert-deftest comma-first-list-after-case-of ()
268
272
" A comma-first list was getting misindented if goes after case-of"
269
273
:expected-result :failed
270
- (purescript-test-indentation "
271
- fun = case _ of
272
- [ a
273
- , b ]
274
- "
275
-
276
- "
274
+ (purescript-test-indentation-expected-only "
277
275
fun = case _ of
278
276
[ a
279
277
, b ]
You can’t perform that action at this time.
0 commit comments