]> granicus.if.org Git - onig/commitdiff
addd test case into encode.c
authorkosako <kosako@sofnec.co.jp>
Thu, 7 Apr 2016 04:39:54 +0000 (13:39 +0900)
committerkosako <kosako@sofnec.co.jp>
Thu, 7 Apr 2016 04:39:54 +0000 (13:39 +0900)
sample/encode.c

index e617a7df9d2bd8f90952ef5fa2d3e7e0bed7c6e8..1daafa9b8d80d2026bf3855b3727918563032e0f 100644 (file)
@@ -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");