mirror of
https://github.com/daylinmorgan/hwylterm.git
synced 2024-12-22 03:00:43 -06:00
add another test case for stripAnsi
This commit is contained in:
parent
d852761831
commit
efaf252305
2 changed files with 3 additions and 1 deletions
|
@ -19,6 +19,7 @@ func stripAnsi*(s: string): string =
|
|||
while s[i] != 'm':
|
||||
inc i
|
||||
inc i
|
||||
if i < s.len:
|
||||
result.add s[i]
|
||||
inc i
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ suite "basic":
|
|||
|
||||
suite "strutils":
|
||||
test "stripAnsi":
|
||||
check stripAnsi($bb"[red]red!") == "red!"
|
||||
check stripAnsi("\e[1mBold String!") == "Bold String!"
|
||||
|
||||
test "&":
|
||||
|
|
Loading…
Reference in a new issue