mirror of
https://github.com/daylinmorgan/hwylterm.git
synced 2024-11-16 06:28:32 -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,7 +19,8 @@ func stripAnsi*(s: string): string =
|
|||
while s[i] != 'm':
|
||||
inc i
|
||||
inc i
|
||||
result.add s[i]
|
||||
if i < s.len:
|
||||
result.add s[i]
|
||||
inc i
|
||||
|
||||
type
|
||||
|
|
|
@ -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