move the col+ansi test to color section

This commit is contained in:
krzygorz 2019-11-07 22:37:33 +01:00
parent 15fef988af
commit 5c43ca7720

View file

@ -733,14 +733,14 @@ def | 6
(test "\x1B;[31mred\x1B;[0m" (show #f (as-red "red"))) (test "\x1B;[31mred\x1B;[0m" (show #f (as-red "red")))
(test "\x1B;[31mred\x1B;[34mblue\x1B;[31mred\x1B;[0m" (test "\x1B;[31mred\x1B;[34mblue\x1B;[31mred\x1B;[0m"
(show #f (as-red "red" (as-blue "blue") "red"))) (show #f (as-red "red" (as-blue "blue") "red")))
(test "\x1b;[31m1234567\x1b;[0m col: 7"
(show #f (as-unicode (as-red "1234567") (fn ((col)) (each " col: " col)))))
;; unicode ;; unicode
(test "〜日本語〜" (test "〜日本語〜"
(show #f (with ((pad-char #\〜)) (padded/both 5 "日本語")))) (show #f (with ((pad-char #\〜)) (padded/both 5 "日本語"))))
(test "日本語" (test "日本語"
(show #f (as-unicode (with ((pad-char #\〜)) (padded/both 5 "日本語"))))) (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" (test "日本語 col: 6"
(show #f (as-unicode "日本語" (fn ((col)) (each " col: " col))))) (show #f (as-unicode "日本語" (fn ((col)) (each " col: " col)))))