From ca22d7f27f27a6157e99c668e51c0ff4951c20c6 Mon Sep 17 00:00:00 2001 From: kosako Date: Thu, 7 Apr 2016 13:39:54 +0900 Subject: [PATCH] addd test case into encode.c --- sample/encode.c | 6 ++++++ 1 file changed, 6 insertions(+) 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"); -- 2.40.0