OSDN Git Service

Fix: -Z1 and -Z2 doesn't include -Z0. [nkf-forum#41992]
[nkf/nkf.git] / nkf_test.pl
index 91a4742..9b0228d 100644 (file)
@@ -2,7 +2,7 @@
 #
 # nkf test program for nkf-2
 #
-# $Id: nkf_test.pl,v 1.30 2008/11/18 21:40:32 naruse Exp $
+# $Id: nkf_test.pl,v 1.31 2008/11/18 21:43:19 naruse Exp $
 #
 #    Shinji KONO <kono@ie.u-ryukyu.ac.jp>
 # Sun Aug 18 12:25:40 JST 1996
@@ -264,7 +264,8 @@ printf "%-40s", "SJIS  Input assumption";
 $example{'utf8_str_of_jis_second_level_kanji'} = "\xe9\xa4\x83\xe5\xad\x90";
 
 printf "%-40s", "UTF8_STR_OF_JIS_SECOND_LEVEL_KANJI";
-    &test("$nkf -g",$example{'utf8_str_of_jis_second_level_kanji'},"UTF-8\n");
+    &test("$nkf -w",$example{'utf8_str_of_jis_second_level_kanji'},
+           $example{'utf8_str_of_jis_second_level_kanji'});
 
 # Broken JIS
 
@@ -956,6 +957,7 @@ eofeof
 printf "%-40s", "test_data/bugs10904";
     &test("$nkf -Mj",$example{'test_data/bugs10904'},$example{'test_data/bugs10904.ans'});
 
+    if (!NKF) {
 printf "%-40s", "Guess NL";
 &command_tests(
        "$nkf --guess","none",      "ASCII\n",
@@ -979,6 +981,7 @@ printf "%-40s", "Guess NL";
        "$nkf --guess","\r\n.\n",   "ASCII (MIXED NL)\n",
        "$nkf --guess","\r\n.\r",   "ASCII (MIXED NL)\n",
        "$nkf --guess","\r\n.\r\n", "ASCII (CRLF)\n");
+    }
 
 printf "%-40s", "Convert NL to LF";
 &command_tests(