From cfa4b2f11a0efdf4ad97c51c8982e4ad4610b615 Mon Sep 17 00:00:00 2001 From: ponce Date: Tue, 5 Aug 2014 20:50:22 +0200 Subject: [PATCH] Fix Windows unittests. --- source/colorize/colors.d | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/colorize/colors.d b/source/colorize/colors.d index 6a3c869..774b1e2 100644 --- a/source/colorize/colors.d +++ b/source/colorize/colors.d @@ -77,27 +77,27 @@ string color( unittest { - import std.stdio; + import colorize.cwrite; string ret; ret = "This is yellow".color(fg.yellow); - writeln(ret); + cwriteln(ret); assert(ret == "\033[33mThis is yellow\033[0m"); ret = "This is light green".color(fg.light_green); - writeln(ret); + cwriteln(ret); assert(ret == "\033[92mThis is light green\033[0m"); ret = "This is light blue with red background".color(fg.light_blue, bg.red); - writeln(ret); + cwriteln(ret); assert(ret == "\033[0;94;41mThis is light blue with red background\033[0m"); ret = "This is red on blue blinking".color(fg.red, bg.blue, mode.blink); - writeln(ret); + cwriteln(ret); assert(ret == "\033[5;31;44mThis is red on blue blinking\033[0m"); ret = color("This is magenta", "magenta"); - writeln(ret); + cwriteln(ret); assert(ret == "\033[35mThis is magenta\033[0m"); } @@ -180,7 +180,7 @@ alias colorHelper color; unittest { - import std.stdio; + import colorize.cwrite; string ret; ret = "This is red on blue blinking" @@ -188,6 +188,6 @@ unittest .background(bg.blue) .style(mode.blink); - writeln(ret); + cwriteln(ret); assert(ret == "\033[5m\033[44m\033[31mThis is red on blue blinking\033[0m\033[0m\033[0m"); }