3 # nkf test program for nkf 2.0
4 # Shinji KONO <kono@ie.u-ryukyu.ac.jp>
5 # Sun Aug 18 12:25:40 JST 1996
6 # Sun Nov 8 00:16:06 JST 1998
7 # Sun Sep 8 14:04:02 JST 2002
9 # This is useful when you add new patch on nkf.
10 # Since this test is too strict, faileurs may not mean
14 # nkf 1.5 differs on MIME decoding
15 # nkf 1.4 passes Basic Conversion tests
16 # nkf PDS version passes Basic Conversion tests using "nkf -iB -oB "
20 # $nkf = "doscmd nkf.exe";
22 # If you want to see the testing process, set next flag.
34 local ($nkf,$in,@ans) = @_;
41 system("$nkf <nkf.in >nkf.out"); # easy
54 if ($result eq $ans) {
62 system "mv nkf.in nkf.in.$error_count.bad";
63 system "mv nkf.out nkf.out.$error_count.bad";
64 open(OUT,"> nkf.expect.$error_count.bad");
69 open(R,"|od -c >tmp.result.bad"); print R $result; close(R);
70 open(R,"|od -c >tmp.expect.bad"); print R $ans; close(R);
71 system "diff -c tmp.result.bad tmp.expect.bad";