aboutsummaryrefslogtreecommitdiffstats
path: root/t/02packdrake.t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-12-07 09:57:56 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-12-07 09:57:56 +0000
commita71fed76ff331259723510eb8e8aae4cecd05ff1 (patch)
treeef2231cfccdae74014dde9087603d39eb8947318 /t/02packdrake.t
parente5470b0a9a78eea38092607eeb787982ce0861cc (diff)
downloadrpmtools-a71fed76ff331259723510eb8e8aae4cecd05ff1.tar
rpmtools-a71fed76ff331259723510eb8e8aae4cecd05ff1.tar.gz
rpmtools-a71fed76ff331259723510eb8e8aae4cecd05ff1.tar.bz2
rpmtools-a71fed76ff331259723510eb8e8aae4cecd05ff1.tar.xz
rpmtools-a71fed76ff331259723510eb8e8aae4cecd05ff1.zip
Compare strings with eq, not ==
Diffstat (limited to 't/02packdrake.t')
-rwxr-xr-xt/02packdrake.t12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/02packdrake.t b/t/02packdrake.t
index 26fef2f..6a26077 100755
--- a/t/02packdrake.t
+++ b/t/02packdrake.t
@@ -10,7 +10,7 @@ use_ok('packdrake');
-d "test" || mkdir "test" or die "Can't create directory test";
-my $coin = "
+my $coin = q{
___________
< Coin coin >
-----------
@@ -20,7 +20,7 @@ my $coin = "
( ( . /
\ '-' /
~'`~'`~'`~'`~
-";
+};
sub clean_test_files {
-d "test" or return;
@@ -34,13 +34,13 @@ open(my $fh, "> test/file") or die "Can't create 'test/file'";
print $fh $coin;
close $fh;
-symlink("file", "test/link") or die "Can't create symlink 'test/link'";
+symlink("file", "test/link") or die "Can't create symlink 'test/link': $!\n";
-open($fh, "> test/list") or die "can't open 'test/list'";
+open($fh, "> test/list") or die "can't open 'test/list': $!\n";
print($fh join("\n", qw(dir file link)) ."\n");
close($fh);
-open(my $listh, "< test/list");
+open(my $listh, "< test/list") or die "can't read 'test/list': $!\n";
ok(packdrake::build_archive(
$listh,
"test",
@@ -58,7 +58,7 @@ ok($pack->extract_archive("test", qw(dir file link)), "Extracting files from arc
ok(open($fh, "test/file"), "Opening extract file");
sysread($fh, my $data, 1_000);
-ok($data == $coin, "data succefully restored");
+ok($data eq $coin, "data succefully restored");
ok(-d "test/dir", "dir succefully restored");
ok(readlink("test/link") eq "file", "symlink succefully restored");