diff options
| author | Tyge Lovset <[email protected]> | 2023-05-21 23:30:25 +0200 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2023-05-21 23:30:25 +0200 |
| commit | 0b34cadda2bc4da1cb0904989c8a5f2fe0236358 (patch) | |
| tree | 038335539ecd9363fbfc70a850a340b291a10888 /misc/tests | |
| parent | 56b0884044610861866a1a27fb64276411604986 (diff) | |
| download | STC-modified-0b34cadda2bc4da1cb0904989c8a5f2fe0236358.tar.gz STC-modified-0b34cadda2bc4da1cb0904989c8a5f2fe0236358.zip | |
NB! Made cstr.h header-only by default. Now requires #define i_static, i_implement or i_extern (includes utf8code.c) to implement non-inline functions (or link with libstc).
Diffstat (limited to 'misc/tests')
| -rw-r--r-- | misc/tests/cregex_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/tests/cregex_test.c b/misc/tests/cregex_test.c index 07e5c3cb..301ecf4f 100644 --- a/misc/tests/cregex_test.c +++ b/misc/tests/cregex_test.c @@ -209,7 +209,7 @@ CTEST(cregex, captures_len) { c_auto (cregex, re) { re = cregex_from("(ab(cd))(ef)"); - ASSERT_EQ(cregex_captures(&re), 4); + ASSERT_EQ(cregex_captures(&re), 3); } } @@ -218,7 +218,7 @@ CTEST(cregex, captures_cap) const char* inp; c_auto (cregex, re) { re = cregex_from("(ab)((cd)+)"); - ASSERT_EQ(cregex_captures(&re), 4); + ASSERT_EQ(cregex_captures(&re), 3); csview cap[5]; ASSERT_EQ(cregex_find(&re, inp="xxabcdcde", cap), CREG_OK); @@ -273,7 +273,7 @@ CTEST(cregex, replace) // Compile RE separately re = cregex_from(pattern); - ASSERT_EQ(cregex_captures(&re), 4); + ASSERT_EQ(cregex_captures(&re), 3); // European date format. cstr_take(&str, cregex_replace(&re, input, "$3.$2.$1")); |
