Make redbean StoreAsset() work better
- Better UBSAN error messages - POSIX Advisory Locks polyfills - Move redbean manual to /.help.txt - System call memory safety in ASAN mode - Character classification now does UNICODE
This commit is contained in:
@@ -154,4 +154,17 @@ BENCH(regex, bench) {
|
||||
EZBENCH2("precompiled nosub match", donothing, D(&rx, m));
|
||||
free(m);
|
||||
regfree(&rx);
|
||||
EXPECT_EQ(REG_OK, regcomp(&rx, "^[a-z]*$", REG_EXTENDED | REG_NOSUB));
|
||||
m = calloc(rx.re_nsub + 1, sizeof(regmatch_t));
|
||||
EZBENCH2("precompiled alpha", donothing,
|
||||
regexec(&rx, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 0, 0, 0));
|
||||
free(m);
|
||||
regfree(&rx);
|
||||
EXPECT_EQ(REG_OK,
|
||||
regcomp(&rx, "^[a-z]*$", REG_EXTENDED | REG_NOSUB | REG_ICASE));
|
||||
m = calloc(rx.re_nsub + 1, sizeof(regmatch_t));
|
||||
EZBENCH2("precompiled alpha icase", donothing,
|
||||
regexec(&rx, "aaaaaaaaaaaaaaaAAAAAAAAAAAAAA", 0, 0, 0));
|
||||
free(m);
|
||||
regfree(&rx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user