Skip to content

Commit

Permalink
Add test for colouring via ansi
Browse files Browse the repository at this point in the history
  • Loading branch information
chmouel committed Sep 24, 2024
1 parent 1d3086b commit 47b824b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,21 @@ snazytest!(
);

snazytest!(
regexp_colored,
regexp_rgb_colored,
["-ryellow:Hello", "-r88,48,235:Moto", "--color", "always"],
"Hello Moto",
"\u{1b}[33mHello\u{1b}[0m \u{1b}[38;2;88;48;235mMoto\u{1b}[0m\n",
false
);

snazytest!(
regexp_ansi_colored,
["-ryellow:Hello", "-r3", "--color", "always"],
"Hello Moto",
"\u{1b}[33mHello\u{1b}[0m Moto\n",
false
);

snazytest!(
multiple_regexp_raw_json,
["-rHello", "-rMoto", "--color", "always"],
Expand Down

0 comments on commit 47b824b

Please sign in to comment.