tweak test formatting

This commit is contained in:
rhiannon morris 2022-05-25 16:05:20 +02:00
parent de3e13bad8
commit 221b69e8e8
1 changed files with 3 additions and 6 deletions

View File

@ -136,14 +136,11 @@ header tests =
let count = length $ filter isRealTest tests in
"1..\{show count}"
private
makePrefix : SnocList String -> String
makePrefix [<] = ""
makePrefix (xs :< x) = foldr (\a, b => "\{a}/\{b}") x xs
private
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
export
@ -246,7 +243,7 @@ mutual
run' : (Nat, Test) -> Runner Bool
run' (index, One test) = run1' (index, test)
run' (index, Group label tests) = do
putColor Magenta "# Subtest: \{label}"
putIndentLines [!(col Magenta "# Subtest: ") ++ label]
res <- local {indent $= plus 4} $ runList tests
putOk res index label
pure res