format: nimpretty did it's thing

This commit is contained in:
Daylin Morgan 2023-09-13 02:33:19 -05:00
parent 30a337f755
commit 48cd26b644
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F
3 changed files with 15 additions and 11 deletions

View file

@ -38,8 +38,10 @@ suite "basic":
test "concat-ops": test "concat-ops":
check "[red]RED[/]".bb & " plain string" == "[red]RED[/] plain string".bb check "[red]RED[/]".bb & " plain string" == "[red]RED[/] plain string".bb
check "[red]RED[/]".bb.len == 3 check "[red]RED[/]".bb.len == 3
check bb("[blue]Blue[/]") & " " & bb("[red]Red[/]") == "[blue]Blue[/] [red]Red[/]".bb check bb("[blue]Blue[/]") & " " & bb("[red]Red[/]") ==
check "a plain string" & "[blue] a blue string".bb == "a plain string[blue] a blue string".bb "[blue]Blue[/] [red]Red[/]".bb
check "a plain string" & "[blue] a blue string".bb ==
"a plain string[blue] a blue string".bb
test "style full": test "style full":
check "[red]Red[/red]".bb == bb("Red", "red") check "[red]Red[/red]".bb == bb("Red", "red")

View file

@ -14,8 +14,10 @@ proc cliRun(cmd: string): string =
suite "cli": suite "cli":
setup: setup:
let cmd = "nim c -o:" & pathToSrc / "bbansi.out " & (pathToSrc / ".." / "src" / "bbansi.nim") let cmd = "nim c -o:" & pathToSrc / "bbansi.out " & (pathToSrc / ".." /
"src" / "bbansi.nim")
check execCmdEx(cmd).exitCode == 0 check execCmdEx(cmd).exitCode == 0
test "simple": test "simple":
check "\e[31mRed\e[0m" == cliRun "[red]Red[/]" check "\e[31mRed\e[0m" == cliRun "[red]Red[/]"
check "\e[1m\e[0m\e[1m\e[31mRed\e[0m\e[1m Not Red but Bold\e[0m" == cliRun "'[red]Red[/] Not Red but Bold' " & "--style:bold" check "\e[1m\e[0m\e[1m\e[31mRed\e[0m\e[1m Not Red but Bold\e[0m" ==
cliRun "'[red]Red[/] Not Red but Bold' " & "--style:bold"