head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.10 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.8 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.6 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.4 pkgsrc-2011Q2-base:1.2 pkgsrc-2009Q4:1.2.0.2 pkgsrc-2009Q4-base:1.2 pkgsrc-2009Q3:1.1.0.6 pkgsrc-2009Q3-base:1.1 pkgsrc-2009Q2:1.1.0.4 pkgsrc-2009Q2-base:1.1 pkgsrc-2009Q1:1.1.0.2 pkgsrc-2009Q1-base:1.1; locks; strict; comment @# @; 1.2 date 2009.11.19.05.42.02; author obache; state dead; branches; next 1.1; 1.1 date 2009.01.22.08.50.12; author obache; state Exp; branches; next ; desc @@ 1.2 log @Update nkf (and p5-nkf) to 2.10. (while here, added commented out LICENSE=zlib-liccense) This release is maintainance release, mainly for bug fixes. * Add install target to Makefile * Let to recognize hankaku-kana in 8bit JIS * Fixes perl module build * Fixes no effect of -Z1, -Z2 and -Z0 option * Fixes input specification for UTF-16 and UTF-32 * Fixes missing BOM output for UTF-32. * Fixes miss guesses and output for 4bytes UTF-8 @ text @$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"; @ 1.1 log @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. @ text @d1 1 a1 1 $NetBSD$ @