OSDN Git Service

#3025 パッチに伴う修正
authorRei FURUKAWA <rei_furukawa@users.sourceforge.jp>
Sun, 5 Oct 2003 16:31:33 +0000 (16:31 +0000)
committerRei FURUKAWA <rei_furukawa@users.sourceforge.jp>
Sun, 5 Oct 2003 16:31:33 +0000 (16:31 +0000)
NKF.mod/test.pl
test.pl

index 48d2ce9..c03b534 100644 (file)
@@ -43,12 +43,12 @@ sub library_test {
     $result = NKF::nkf(@nkf,$in);
     print "\nGOT:\n",$result if ($detail || $detail_all);
 
-    if( $nkf =~ /-m/) {
+    if( $nkf =~ /-\S*m/) {
         $result =~ s/ //g;
     }
     $i = 0;
     foreach $ans (@ans) {
-        if( $nkf =~ /-m/) {
+        if( $nkf =~ /-\S*m/) {
             $ans =~ s/ //g;
         }
         last if ($result eq $ans) ;
diff --git a/test.pl b/test.pl
index 340f87e..58f6548 100644 (file)
--- a/test.pl
+++ b/test.pl
@@ -16,7 +16,7 @@
 # nkf PDS version passes Basic Conversion tests  using "nkf -iB -oB "
 #
 
-$nkf = "./nkf";
+$nkf = 'MSWin32' eq $^O ? ".\\nkf" : "./nkf";
 # $nkf = "doscmd nkf.exe";
 
 # If you want to see the testing process, set next flag.
@@ -43,12 +43,13 @@ sub command_test {
     while(<IN>) {
        $result .= $_;
     }
-    if( $nkf =~ /-m/) {
+
+    if( $nkf =~ /-\S*m/) {
        $result =~ s/ //g;
     }
     $i = 0;
     foreach $ans (@ans) {
-       if( $nkf =~ /-m/) {
+       if( $nkf =~ /-\S*m/) {
            $ans =~ s/ //g;
        }
         if ($result eq $ans) {