mirror of
https://github.com/yamadapc/d-colorize
synced 2024-11-14 21:14:00 +01:00
Fix Windows unittests.
This commit is contained in:
parent
a075732c0b
commit
cfa4b2f11a
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue