add a test for col with unicode and ANSI escapes

This commit is contained in:
krzygorz 2019-11-07 22:31:29 +01:00
parent 05521e5e1d
commit 15fef988af

View file

@ -739,6 +739,10 @@ def | 6
(show #f (with ((pad-char #\〜)) (padded/both 5 "日本語"))))
(test "日本語"
(show #f (as-unicode (with ((pad-char #\〜)) (padded/both 5 "日本語")))))
(test "\x1b;[31m1234567\x1b;[0m col: 7"
(show #f (as-unicode (as-red "1234567") (fn ((col)) (each " col: " col)))))
(test "日本語 col: 6"
(show #f (as-unicode "日本語" (fn ((col)) (each " col: " col)))))
;; from-file
;; for reference, filesystem-test relies on creating files under /tmp