summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-20 13:28:43 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-20 13:28:46 +0900
commit68350a72ce24d6fb80949d74540f990400e2a224 (patch)
tree47b27aa8eba19d783fc6dee842ba57c2bdbcecc9 /test
parent6ad0574136d3b23b486db4fa359672b9f731e235 (diff)
downloaddos2unix-68350a72ce24d6fb80949d74540f990400e2a224.tar.gz
dos2unix-68350a72ce24d6fb80949d74540f990400e2a224.tar.bz2
dos2unix-68350a72ce24d6fb80949d74540f990400e2a224.zip
Imported Upstream version 7.1
Change-Id: Ia2a4f7e308ce7819dc120fd987eca52243e233cd Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/Makefile2
-rwxr-xr-xtest/ascii.t2
-rw-r--r--test/info.txt9
-rwxr-xr-xtest/iso.t2
-rwxr-xr-xtest/misc.t5
-rwxr-xr-xtest/symlink.t2
-rwxr-xr-xtest/utf16.t2
-rwxr-xr-xtest/utf8.t2
8 files changed, 19 insertions, 7 deletions
diff --git a/test/Makefile b/test/Makefile
index 25832a5..02672bf 100755
--- a/test/Makefile
+++ b/test/Makefile
@@ -32,4 +32,4 @@ symlink:
prove -v $@.t
clean:
- rm -f out*.txt in*.txt
+ rm -f out*.txt in_link.txt
diff --git a/test/ascii.t b/test/ascii.t
index 64f6c7b..cf94beb 100755
--- a/test/ascii.t
+++ b/test/ascii.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# Requires perl-Test-Simple installation.
-use Test::More tests => 30;
+use Test::Simple tests => 30;
$suffix = "";
if (-e "../dos2unix.exe") {
diff --git a/test/info.txt b/test/info.txt
new file mode 100644
index 0000000..1f469a9
--- /dev/null
+++ b/test/info.txt
@@ -0,0 +1,9 @@
+ 6 0 0 no_bom text dos.txt
+ 0 6 0 no_bom text unix.txt
+ 0 0 6 no_bom text mac.txt
+ 6 6 6 no_bom text mixed.txt
+ 50 0 0 UTF-16LE text utf16le.txt
+ 50 0 0 UTF-16BE text utf16be.txt
+ 0 51 52 no_bom binary utf16len.txt
+ 0 50 0 no_bom text utf8unix.txt
+ 50 0 0 UTF-8 text utf8dos.txt
diff --git a/test/iso.t b/test/iso.t
index 69af494..19b27f3 100755
--- a/test/iso.t
+++ b/test/iso.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# Requires perl-Test-Simple installation.
-use Test::More tests => 12;
+use Test::Simple tests => 12;
$suffix = "";
if (-e "../dos2unix.exe") {
diff --git a/test/misc.t b/test/misc.t
index b8da955..f0e63a7 100755
--- a/test/misc.t
+++ b/test/misc.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# Requires perl-Test-Simple installation.
-use Test::More tests => 16;
+use Test::Simple tests => 17;
$suffix = "";
if (-e "../dos2unix.exe") {
@@ -90,3 +90,6 @@ ok( $? == 0, '7bit enabled again, unix2dos');
system("$UNIX2DOS -v -u -m -n unix.txt out_dos.txt; cmp out_dos.txt dos_bom.txt");
ok( $? == 0, 'Option -u must not disable -m on ASCII input');
+system("$DOS2UNIX -i dos.txt unix.txt mac.txt mixed.txt utf16le.txt utf16be.txt utf16len.txt utf8unix.txt utf8dos.txt > outinfo.txt");
+system("$DOS2UNIX outinfo.txt; diff info.txt outinfo.txt");
+ok( $? == 0, 'Option -i, --info');
diff --git a/test/symlink.t b/test/symlink.t
index 6baa0a4..f64d924 100755
--- a/test/symlink.t
+++ b/test/symlink.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# Requires perl-Test-Simple installation.
-use Test::More tests => 14;
+use Test::Simple tests => 14;
$suffix = "";
if (-e "../dos2unix.exe") {
diff --git a/test/utf16.t b/test/utf16.t
index 3f4960a..de61253 100755
--- a/test/utf16.t
+++ b/test/utf16.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# Requires perl-Test-Simple installation.
-use Test::More tests => 19;
+use Test::Simple tests => 19;
$suffix = "";
if (-e "../dos2unix.exe") {
diff --git a/test/utf8.t b/test/utf8.t
index 454ed99..357390f 100755
--- a/test/utf8.t
+++ b/test/utf8.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# Requires perl-Test-Simple installation.
-use Test::More tests => 6;
+use Test::Simple tests => 6;
$suffix = "";
if (-e "../dos2unix.exe") {