summaryrefslogtreecommitdiffhomepage
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/examples/make.sh2
-rw-r--r--misc/tests/cregex_test.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/misc/examples/make.sh b/misc/examples/make.sh
index ee8d2267..25b720b8 100755
--- a/misc/examples/make.sh
+++ b/misc/examples/make.sh
@@ -6,7 +6,7 @@ if [ "$(uname)" = 'Linux' ]; then
oflag='-o '
fi
-cc=gcc; cflags="-s -O3 -std=c99 -Wall -Wextra -Wpedantic -Wconversion -Wwrite-strings -Wdouble-promotion -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized -Wno-missing-field-initializers"
+cc=gcc; cflags="-DSTC_STATIC -s -O3 -std=c99 -Wall -Wextra -Wpedantic -Wconversion -Wwrite-strings -Wdouble-promotion -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized -Wno-missing-field-initializers"
#cc=gcc; cflags="-g -std=c99 -Werror -Wfatal-errors -Wpedantic -Wall $sanitize"
#cc=tcc; cflags="-Wall -std=c99"
#cc=clang; cflags="-s -O2 -std=c99 -Werror -Wfatal-errors -Wpedantic -Wall -Wno-unused-function -Wsign-compare -Wwrite-strings"
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"));