diff options
author | obache <obache@pkgsrc.org> | 2009-01-22 08:50:12 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2009-01-22 08:50:12 +0000 |
commit | 3c9c767aaca5a80d4b599e5c30056e0d9def497a (patch) | |
tree | 8dae9e28dc3f1ed5f717bf4aea263627ca117378 /converters/nkf/patches/patch-ab | |
parent | d2ff71c3445c5160c93f4cc263cd46a7053569ce (diff) | |
download | pkgsrc-3c9c767aaca5a80d4b599e5c30056e0d9def497a.tar.gz |
Update nkf to 2.09.
While here, add support of self test if PKGSRC_RUN_TEST=YES,
and let p5-nkf to sync with nkf.
Changes:
* Add -Z4 option. Convert JIS X 0208 KANA to JIS X 0201 KANA (ZENKAKU to HANKAKU).
* Add -g=0, -g=1, --guess=0 and --guess=1 option.
guesses linefeed code.
* Add some comple option. See also config.h for more information.
* Some bug fixes.
* Change license from original one to zlib's one.
* Change SCM from CVS to Git.
Diffstat (limited to 'converters/nkf/patches/patch-ab')
-rw-r--r-- | converters/nkf/patches/patch-ab | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/converters/nkf/patches/patch-ab b/converters/nkf/patches/patch-ab new file mode 100644 index 00000000000..9b9a7e85d63 --- /dev/null +++ b/converters/nkf/patches/patch-ab @@ -0,0 +1,43 @@ +$NetBSD: patch-ab,v 1.1 2009/01/22 08:50:12 obache Exp $ + +Fix: can't run test. +http://git.sourceforge.jp/view?p=nkf/nkf.git;a=commitdiff;h=b7ee1f1b26ba715116fd8f66e83bf1ad8a95bcce + +--- NKF.mod/test.pl.orig 2009-01-20 09:49:31.000000000 +0000 ++++ NKF.mod/test.pl +@@ -114,8 +114,35 @@ END {print "not ok 1\n" unless $loaded;} + } else { + print "no 5\n"; + } ++} + ++sub command_tests { ++ my @tests = @_; ++ my ($in, $out, $ans); + ++ for (my $i = 0; $i <= $#tests; $i += 3){ ++ local (@nkf) = split(/ /,$tests[$i]); ++ shift(@nkf); ++ $in = $tests[$i+1]; ++ $ans = $tests[$i+2]; ++ $out = NKF::nkf(@nkf,$in); ++ $out =~ s/ //g if $nkf =~ /-\w+m[NS]/o; ++ $ans =~ s/ //g if $nkf =~ /-\w+m[NS]/o; ++ if ($out ne $ans) { ++ last; ++ } ++ } ++ if ($out eq $ans) { ++ print "Ok\n"; ++ return; ++ } ++ print "Fail\n"; ++ if ($diff) { ++ open(R,"|od -c >tmp.result.bad"); binmode R; print R $out; close(R); ++ open(R,"|od -c >tmp.expect.bad"); binmode R; print R $ans; close(R); ++ system "diff -c tmp.result.bad tmp.expect.bad"; ++ } ++ return; + } + + do "../nkf_test.pl"; |