diff options
Diffstat (limited to 'test/testc.c')
-rw-r--r-- | test/testc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/testc.c b/test/testc.c index 4aa8807..c3174cd 100644 --- a/test/testc.c +++ b/test/testc.c @@ -1,5 +1,6 @@ /* - * This program was generated by testconv.rb. + * testc.c + * Copyright (c) 2019 K.Kosako */ #include "config.h" #include <stdio.h> @@ -71,7 +72,7 @@ static void xx(char* pattern, char* str, int from, int to, int mem, int not) } else { fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str, - from, to, pmatch[mem].rm_so, pmatch[mem].rm_eo); + from, to, pmatch[mem].rm_so, pmatch[mem].rm_eo); nfail++; } } @@ -83,7 +84,7 @@ static void xx(char* pattern, char* str, int from, int to, int mem, int not) OnigErrorInfo einfo; r = onig_new(®, (UChar* )pattern, (UChar* )(pattern + SLEN(pattern)), - ONIG_OPTION_DEFAULT, ONIG_ENCODING_EUC_JP, ONIG_SYNTAX_DEFAULT, &einfo); + ONIG_OPTION_DEFAULT, ONIG_ENCODING_EUC_JP, ONIG_SYNTAX_DEFAULT, &einfo); if (r) { char s[ONIG_MAX_ERROR_MESSAGE_LEN]; onig_error_code_to_str((UChar* )s, r, &einfo); @@ -93,8 +94,8 @@ static void xx(char* pattern, char* str, int from, int to, int mem, int not) } r = onig_search(reg, (UChar* )str, (UChar* )(str + SLEN(str)), - (UChar* )str, (UChar* )(str + SLEN(str)), - region, ONIG_OPTION_NONE); + (UChar* )str, (UChar* )(str + SLEN(str)), + region, ONIG_OPTION_NONE); if (r < ONIG_MISMATCH) { char s[ONIG_MAX_ERROR_MESSAGE_LEN]; onig_error_code_to_str((UChar* )s, r); @@ -125,7 +126,7 @@ static void xx(char* pattern, char* str, int from, int to, int mem, int not) } else { fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str, - from, to, region->beg[mem], region->end[mem]); + from, to, region->beg[mem], region->end[mem]); nfail++; } } @@ -965,7 +966,7 @@ extern int main(int argc, char* argv[]) #endif fprintf(stdout, - "\nRESULT SUCC: %d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n", + "\nRESULT SUCC: %4d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n", nsucc, nfail, nerror, onig_version()); #ifndef POSIX_TEST |