summaryrefslogtreecommitdiff
path: root/colors/test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'colors/test.ts')
-rw-r--r--colors/test.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/colors/test.ts b/colors/test.ts
index 1acc30072..266868090 100644
--- a/colors/test.ts
+++ b/colors/test.ts
@@ -7,5 +7,19 @@ test(function singleColor() {
});
test(function doubleColor() {
- assertEqual(color.red.bgBlue("Hello world"), "Hello world");
+ assertEqual(color.red.bgBlue("Hello world"),
+ "Hello world");
+});
+
+test(function newLinesContinueColors() {
+ assertEqual(color.red("Hello\nworld"),
+ "Hello\nworld");
+ assertEqual(color.red("Hello\r\nworld"),
+ "Hello\r\nworld");
+ assertEqual(color.red("Hello\n\nworld"),
+ "Hello\n\nworld");
+});
+
+test(function replacesCloseCharacters() {
+ assertEqual(color.red("Hello"), "Hello");
});