Skip to content

Commit 592f0f0

Browse files
committed
test: tighten parse error assertion and document reason
1 parent 09ad4a2 commit 592f0f0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ tests =
5252
-- 1. Contains the exit code prefix (base message intact)
5353
assertBool ("Expected exit code prefix, got: " <> T.unpack msg)
5454
("failed with exit code" `T.isInfixOf` msg)
55-
-- 2. Contains stderr parse error details
55+
-- 2. Contains a stable parse-error phrase from formatter stderr
5656
assertBool ("Expected parse error details from stderr, got: " <> T.unpack msg)
57-
("parse error" `T.isInfixOf` msg)
57+
("parse error on input" `T.isInfixOf` msg)
5858
Right _ ->
5959
assertFailure "Expected formatting to fail on unparsable file"
6060
]

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ tests = testGroup "ormolu" $
5252
-- 1. Contains the exit code prefix (base message intact)
5353
assertBool ("Expected exit code prefix, got: " <> T.unpack msg)
5454
("failed with exit code" `T.isInfixOf` msg)
55-
-- 2. Contains stderr parse error details
55+
-- 2. Contains a stable parse-error phrase from formatter stderr
5656
assertBool ("Expected parse error details from stderr, got: " <> T.unpack msg)
57-
("parse error" `T.isInfixOf` msg)
57+
("parse error on input" `T.isInfixOf` msg)
5858
Right _ ->
5959
assertFailure "Expected formatting to fail on unparsable file"
6060
]

0 commit comments

Comments
 (0)