Second unit test
This commit is contained in:
parent
f4b4dde8e0
commit
d509aa254d
|
@ -22,4 +22,28 @@
|
|||
|
||||
(test-equal "Current sequence should be #f" #f (cur-seq)))))
|
||||
|
||||
|
||||
(test-equal
|
||||
"Text should contain a bold sequence with only one reset sequence"
|
||||
"\x1b[1mhello\x1b[0m你好"
|
||||
(call-with-output-string
|
||||
(λ (str-port)
|
||||
(define-values (ansi-port cur-seq reset restore)
|
||||
(make-ansi-port-tuple str-port))
|
||||
|
||||
;; no-op reset
|
||||
(reset)
|
||||
|
||||
(display "\x1b[1mhello" ansi-port)
|
||||
|
||||
(test-equal "cur-seq should have bold"
|
||||
"\x1b[1m"
|
||||
(cur-seq))
|
||||
|
||||
;; op reset
|
||||
(reset)
|
||||
|
||||
(display "你好" ansi-port))))
|
||||
|
||||
|
||||
(test-end "test-ansi")
|
||||
|
|
Loading…
Reference in New Issue