Skip to content

Commit d4cc01b

Browse files
Add comment
1 parent 4d59532 commit d4cc01b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/Spec/BotPlutusInterface/Contract.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,11 +897,15 @@ assertCommandHistory state =
897897
(fromMaybe "" $ state ^? commandHistory . ix idx)
898898
)
899899

900+
-- | assertEqual but using `commandEqual`
900901
assertCommandEqual :: String -> Text -> Text -> Assertion
901902
assertCommandEqual err expected actual
902903
| commandEqual expected actual = return ()
903904
| otherwise = assertFailure $ err ++ "\nExpected:\n" ++ show expected ++ "\nGot:\n" ++ show actual
904905

906+
-- | Checks if a command matches an expected command pattern
907+
-- Where a command pattern may use new lines in place of spaces, and use the wildcard `?` to match up to the next space
908+
-- E.g. `commandEqual "123\n456 ? 0" "123 456 789 0"` == `True`
905909
commandEqual :: Text -> Text -> Bool
906910
commandEqual "" "" = True
907911
commandEqual "" _ = False

0 commit comments

Comments
 (0)