OSDN Git Service

*** empty log message ***
[nkf/nkf.git] / make_test.pl
1 #!/usr/bin/perl
2 while ( <test_data/*.cmd> ) {
3     $file = $_; 
4     $test = $file; $test =~ s/\.cmd$//;
5     $out = $test.".out"; $out = `cat $out`;
6     $in = $test.".in"; $in = `cat $in`;
7     $opt = `cat $file`; chop($opt);
8
9     $inpack = pack('u',$in); chop($inpack);
10     $outpack = pack('u',$out); chop($outpack);
11
12 print << "EOFEOF";
13 # $test
14
15 \$example{'$test'} = unpack('u',<<'eofeof');
16 $inpack
17 eofeof
18
19 \$example{'$test.ans'} = unpack('u',<<'eofeof');
20 $outpack
21 eofeof
22
23 print "$test    ";
24     \&test("\$nkf $opt",\$example{'$test'},\$example{'$test.ans'});
25 EOFEOF
26
27 }