mirror of
https://github.com/daylinmorgan/hwylterm.git
synced 2024-11-16 06:28:32 -06:00
17 lines
440 B
Nim
17 lines
440 B
Nim
import std/[
|
|
unittest
|
|
]
|
|
|
|
|
|
import hwylterm, hwylterm/cli
|
|
|
|
suite "cli":
|
|
test "cli":
|
|
let expected = """[b]test-program[/] [[args...]
|
|
|
|
[b cyan]flags[/]:
|
|
[yellow]-h[/] [magenta]--help [/] []show this help[/]
|
|
[yellow]-V[/] [magenta]--version[/] []print version[/]
|
|
"""
|
|
let cli = newHwylCli("[b]test-program[/] [[args...]",flags = [("h","help","show this help",),("V","version","print version")])
|
|
check $cli == $bb(expected)
|