diff options
| author | fukachan <fukachan> | 2001-02-11 14:14:02 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-02-11 14:14:02 +0000 |
| commit | 37d68e72f8e1f89a784bc5a8d816031deb694c97 (patch) | |
| tree | 048fee0f37001597f36db5602d1d7cfa2c667af0 | |
| parent | 647db67a6c989a9dc3a03aaa8ddce6f8d9fda0e8 (diff) | |
| download | fml8-snap-20010211.tar.gz fml8-snap-20010211.tar.bz2 fml8-snap-20010211.zip | |
iso2022jp checkersnap-20010211
| -rwxr-xr-x | regress/ISO2022JP/is_iso2022jp_string | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/regress/ISO2022JP/is_iso2022jp_string b/regress/ISO2022JP/is_iso2022jp_string new file mode 100755 index 00000000..c58cc953 --- /dev/null +++ b/regress/ISO2022JP/is_iso2022jp_string @@ -0,0 +1,27 @@ +#!/usr/local/bin/perl + + +use Dialect::ISO2022JP qw(is_iso2022jp_string); + +$string = '¤¦¤¸¤ã'; + +use Jcode; + +printf "%15s", "jis ... "; +Jcode::convert(\$string, 'jis'); +print is_iso2022jp_string($string) ? "ok\n" : "fail\n"; + +for ('ascii', 'binary', 'sjis', 'euc', 'ucs2', 'utf8') { + check($_); +} + + +sub check +{ + my ($code) = @_; + + printf "%15s", "$code ... "; + Jcode::convert(\$string, $code); + print is_iso2022jp_string($string) ? "fail\n" : "ok\n"; +} + |
