summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-01-07 15:04:24 +0100
committerSébastien Helleu <flashcode@flashtux.org>2018-01-07 15:04:24 +0100
commitbe7002b70db9ef104b5fb141939c4bfbe4e7de6b (patch)
tree9124cf24b13e60a7d20c7803897de8d6679e58a8 /tests
parent1999d19ebb990dbf3600ec24fe70665bd77245a9 (diff)
downloadweechat-be7002b70db9ef104b5fb141939c4bfbe4e7de6b.zip
tests: fix tests on function string_regex_flags
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/core/test-string.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/unit/core/test-string.cpp b/tests/unit/core/test-string.cpp
index 1da37c0e6..80e0babe4 100644
--- a/tests/unit/core/test-string.cpp
+++ b/tests/unit/core/test-string.cpp
@@ -575,29 +575,29 @@ TEST(String, Regex)
string_regex_flags ("", REG_EXTENDED, &flags);
LONGS_EQUAL(REG_EXTENDED, flags);
- ptr = string_regex_flags ("test", REG_EXTENDED, &flags);
+ ptr = string_regex_flags ("test1", REG_EXTENDED, &flags);
LONGS_EQUAL(REG_EXTENDED, flags);
- STRCMP_EQUAL("test", ptr);
+ STRCMP_EQUAL("test1", ptr);
- string_regex_flags ("(?e)test", 0, &flags);
+ ptr = string_regex_flags ("(?e)test2", 0, &flags);
LONGS_EQUAL(REG_EXTENDED, flags);
- STRCMP_EQUAL("test", ptr);
+ STRCMP_EQUAL("test2", ptr);
- string_regex_flags ("(?ei)test", 0, &flags);
+ ptr = string_regex_flags ("(?ei)test3", 0, &flags);
LONGS_EQUAL(REG_EXTENDED | REG_ICASE, flags);
- STRCMP_EQUAL("test", ptr);
+ STRCMP_EQUAL("test3", ptr);
- string_regex_flags ("(?eins)test", 0, &flags);
+ ptr = string_regex_flags ("(?eins)test4", 0, &flags);
LONGS_EQUAL(REG_EXTENDED | REG_ICASE | REG_NEWLINE | REG_NOSUB, flags);
- STRCMP_EQUAL("test", ptr);
+ STRCMP_EQUAL("test4", ptr);
- string_regex_flags ("(?ins)test", REG_EXTENDED, &flags);
+ ptr = string_regex_flags ("(?ins)test5", REG_EXTENDED, &flags);
LONGS_EQUAL(REG_EXTENDED | REG_ICASE | REG_NEWLINE | REG_NOSUB, flags);
- STRCMP_EQUAL("test", ptr);
+ STRCMP_EQUAL("test5", ptr);
- string_regex_flags ("(?ins-e)test", REG_EXTENDED, &flags);
+ ptr = string_regex_flags ("(?ins-e)test6", REG_EXTENDED, &flags);
LONGS_EQUAL(REG_ICASE | REG_NEWLINE | REG_NOSUB, flags);
- STRCMP_EQUAL("test", ptr);
+ STRCMP_EQUAL("test6", ptr);
/* compile regular expression */
LONGS_EQUAL(-1, string_regcomp (&regex, NULL, 0));