From: kosako Date: Thu, 7 Apr 2016 04:39:54 +0000 (+0900) Subject: addd test case into encode.c X-Git-Tag: v6.0.0^2~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca22d7f27f27a6157e99c668e51c0ff4951c20c6;p=onig addd test case into encode.c --- diff --git a/sample/encode.c b/sample/encode.c index e617a7d..1daafa9 100644 --- a/sample/encode.c +++ b/sample/encode.c @@ -128,6 +128,12 @@ extern int main(int argc, char* argv[]) static unsigned char str[] = { 0xc7, 0xd6, 0xfe, 0xea, 0xe0, 0xe2, 0x00 }; static unsigned char pattern[] = { 0xe7, 0xf6, 0xde, '\\', 'w', '+', 0x00 }; + r = exec(ONIG_ENCODING_SJIS, ONIG_OPTION_NONE, + "^a\\p{Hiragana}c$", "a\202\274c"); + + r = exec(ONIG_ENCODING_EUC_JP, ONIG_OPTION_NONE, + "^a\\p{Hiragana}c$", "a\244\276c"); + r = exec(ONIG_ENCODING_CP1251, ONIG_OPTION_IGNORECASE, "aBc", " AbC");