diff options
Diffstat (limited to 'test/gb18030.t')
-rwxr-xr-x | test/gb18030.t | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/test/gb18030.t b/test/gb18030.t index 078e7df..0c6ee94 100755 --- a/test/gb18030.t +++ b/test/gb18030.t @@ -1,7 +1,7 @@ #!/usr/bin/perl # Requires perl-Test-Simple installation. -use Test::Simple tests => 12; +use Test::Simple tests => 7; $suffix = ""; if (-e "../dos2unix.exe") { @@ -41,23 +41,5 @@ ok( $? == 0, 'unix2dos -r removes GB18030 BOM' ); system("$UNIX2DOS $GB_OPT -v -m -n unix.txt out_dos.txt; cmp out_dos.txt dos_gb.txt"); ok( $? == 0, 'unix2dos -m adds GB18030 BOM' ); -system("$DOS2UNIX $GB_OPT -v -n utf16le.txt out_unix.txt; cmp out_unix.txt gb18030u.txt"); -ok( $? == 0, 'dos2unix convert DOS UTF-16LE to Unix GB18030' ); - -system("$DOS2UNIX $GB_OPT -b -v -n utf16le.txt out_unix.txt; cmp out_unix.txt gb18030b.txt"); -ok( $? == 0, 'dos2unix convert DOS UTF-16LE to Unix GB18030, keep BOM' ); - -system("$UNIX2DOS $GB_OPT -v -n utf16be.txt out_dos.txt; cmp out_dos.txt gb18030.txt"); -ok( $? == 0, 'unix2dos convert DOS UTF-16BE to DOS GB18030, keep BOM' ); - system("$DOS2UNIX $GB_OPT -u -v -m -n dos.txt out_unix.txt; cmp out_unix.txt unix_gb.txt"); ok( $? == 0, 'dos2unix with option -u adds GB18030 BOM to non UTF-16 file' ); - -$ENV{'LC_ALL'} = 'en_US.UTF-8'; - -system("$DOS2UNIX -v -b -n dos_gb.txt out_unix.txt; cmp out_unix.txt unix_gb.txt"); -ok( $? == 0, 'dos2unix -b keeps GB18030 BOM in UTF-8 locale' ); - -system("$UNIX2DOS -v -n unix_gb.txt out_dos.txt; cmp out_dos.txt dos_gb.txt"); -ok( $? == 0, 'unix2dos keeps GB18030 BOM in UTF-8 locale' ); - |