mirror of
https://github.com/ilyakooo0/optparse-applicative.git
synced 2024-11-22 22:18:13 +03:00
Fix suggestions test
This commit is contained in:
parent
d1c8396f59
commit
7b2175bfc6
@ -649,16 +649,16 @@ prop_many_pairs_lazy_progress = once $
|
||||
|
||||
prop_suggest :: Property
|
||||
prop_suggest = once $
|
||||
let p2 = subparser (command "reachable" (info (pure ()) idm))
|
||||
p1 = subparser (command "unreachable" (info (pure ()) idm))
|
||||
p = (,) <$> p2 <*> p1
|
||||
let p2 = subparser (command "first" (info (pure ()) idm))
|
||||
p1 = subparser (command "fst" (info (pure ()) idm))
|
||||
p3 = subparser (command "far-off" (info (pure ()) idm))
|
||||
p = p2 *> p1 *> p3
|
||||
i = info p idm
|
||||
result = run i ["ureachable"]
|
||||
result = run i ["fist"]
|
||||
in assertError result $ \failure ->
|
||||
let (msg, _) = renderFailure failure "prog"
|
||||
in counterexample msg
|
||||
$ isInfixOf "Did you mean this?\n reachable" msg
|
||||
.&. not (isInfixOf "unreachable" msg)
|
||||
$ isInfixOf "Did you mean one of these?\n first\n fst" msg
|
||||
|
||||
prop_bytestring_reader :: Property
|
||||
prop_bytestring_reader = once $
|
||||
|
Loading…
Reference in New Issue
Block a user