tweak test formatting
This commit is contained in:
parent
de3e13bad8
commit
221b69e8e8
1 changed files with 3 additions and 6 deletions
|
@ -136,14 +136,11 @@ header tests =
|
||||||
let count = length $ filter isRealTest tests in
|
let count = length $ filter isRealTest tests in
|
||||||
"1..\{show count}"
|
"1..\{show count}"
|
||||||
|
|
||||||
private
|
|
||||||
makePrefix : SnocList String -> String
|
|
||||||
makePrefix [<] = ""
|
|
||||||
makePrefix (xs :< x) = foldr (\a, b => "\{a}/\{b}") x xs
|
|
||||||
|
|
||||||
private
|
private
|
||||||
withPrefix : SnocList String -> TestBase -> Test
|
withPrefix : SnocList String -> TestBase -> Test
|
||||||
withPrefix pfx b = One $ {label := "[\{makePrefix pfx}] \{b.label}"} b
|
withPrefix pfx = One . {label $= (makePrefix pfx ++)}
|
||||||
|
where makePrefix = concatMap $ \s => "\{s} ⟫ "
|
||||||
|
|
||||||
mutual
|
mutual
|
||||||
export
|
export
|
||||||
|
@ -246,7 +243,7 @@ mutual
|
||||||
run' : (Nat, Test) -> Runner Bool
|
run' : (Nat, Test) -> Runner Bool
|
||||||
run' (index, One test) = run1' (index, test)
|
run' (index, One test) = run1' (index, test)
|
||||||
run' (index, Group label tests) = do
|
run' (index, Group label tests) = do
|
||||||
putColor Magenta "# Subtest: \{label}"
|
putIndentLines [!(col Magenta "# Subtest: ") ++ label]
|
||||||
res <- local {indent $= plus 4} $ runList tests
|
res <- local {indent $= plus 4} $ runList tests
|
||||||
putOk res index label
|
putOk res index label
|
||||||
pure res
|
pure res
|
||||||
|
|
Loading…
Reference in a new issue