mirror of
https://github.com/ashaduri/gsmartcontrol.git
synced 2026-09-26 13:55:34 +00:00
Implemented app_pcre_get_options() tests.
This commit is contained in:
@@ -16,8 +16,33 @@ Copyright:
|
||||
|
||||
TEST_CASE("AppPcreCpp", "[app][pcrecpp]")
|
||||
{
|
||||
REQUIRE(app_pcre_get_options("i").caseless() == true);
|
||||
// Default flags
|
||||
CHECK(app_pcre_get_options("").all_options() == 0x00500000); // PCRE_NEWLINE_ANYCRLF
|
||||
|
||||
REQUIRE(app_pcre_get_options("i").caseless() == true);
|
||||
REQUIRE(app_pcre_get_options("m").multiline() == true);
|
||||
REQUIRE(app_pcre_get_options("s").dotall() == true);
|
||||
REQUIRE(app_pcre_get_options("E").dollar_endonly() == true);
|
||||
REQUIRE(app_pcre_get_options("X").extra() == true);
|
||||
REQUIRE(app_pcre_get_options("x").extended() == true);
|
||||
REQUIRE(app_pcre_get_options("8").utf8() == true);
|
||||
REQUIRE(app_pcre_get_options("U").ungreedy() == true);
|
||||
REQUIRE(app_pcre_get_options("N").no_auto_capture() == true);
|
||||
|
||||
// Multiple flags
|
||||
REQUIRE(app_pcre_get_options("imX").caseless() == true);
|
||||
REQUIRE(app_pcre_get_options("imX").multiline() == true);
|
||||
REQUIRE(app_pcre_get_options("imX").dotall() == false);
|
||||
REQUIRE(app_pcre_get_options("imX").dollar_endonly() == false);
|
||||
REQUIRE(app_pcre_get_options("imX").extra() == true);
|
||||
REQUIRE(app_pcre_get_options("imX").extended() == false);
|
||||
REQUIRE(app_pcre_get_options("imX").utf8() == false);
|
||||
REQUIRE(app_pcre_get_options("imX").ungreedy() == false);
|
||||
REQUIRE(app_pcre_get_options("imX").no_auto_capture() == false);
|
||||
|
||||
// Invalid flags
|
||||
CHECK(app_pcre_get_options("Z").all_options() == 0x00500000); // PCRE_NEWLINE_ANYCRLF
|
||||
REQUIRE(app_pcre_get_options("Zi").caseless() == true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user