From 186dc04a86000e7c482b19012511233fb30e251e Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 7 Apr 2023 16:09:52 +0200 Subject: [PATCH] adds a Catch2 theme --- colout/colout_catch2.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 colout/colout_catch2.py diff --git a/colout/colout_catch2.py b/colout/colout_catch2.py new file mode 100644 index 0000000..600b1a2 --- /dev/null +++ b/colout/colout_catch2.py @@ -0,0 +1,23 @@ +def theme(context): + + return context,[ + ["^ (Start)(.*): (.*):(.*)$", "yellow", "normal,normal,normal,bold"], # Test start. + # path file ext:line : + ["^(tests): (/.*?)/([^/:]+):([0-9]+): (.*)", "yellow,none,white,yellow,red", "bold,normal,bold,normal,bold"], + ["(`)(.*)('.*)", "red,Cpp,red", "bold,normal,bold"], + ["^\.+$", "yellow", "bold"], + ["^=+$", "yellow", "bold"], + ["(/.*?)/([^/:]+):([0-9]+): (FAILED):", "white,white,yellow,red", "normal,bold,normal,bold"], + ["(REQUIRE\(|CHECK\(|REQUIRE_THAT\()(.*)(\))$","yellow,Cpp,yellow","bold,normal,bold"], + # Hide uninteresting stuff: + ["[0-9]+/[0-9]+ Test.*","blue"], + ["^Filters:.*","blue"], + ["^Randomness seeded to:.*","blue"], + ["^tests is a Catch2.*","blue"], + ["^Run with.*", "blue"], + ["^~+$","blue"], + ["^-+$","blue"], + ["^\s*(Scenario:|Given:|When:|Then:).*","blue"], + ["^(/.*?)/([^/:]+):([0-9]+)", "blue"], + ["^(test cases|assertions)(.*)", "blue"], + ]