summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-29 05:04:03 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-29 05:04:03 +0000
commita1737d5b9df80320e5be59ab8fa7c96455d6b5bf (patch)
tree136e5623245126889491027820f0c1e19624740b /t
parent17c3b45099488fbc22dc1d4e0e4600c17bc12645 (diff)
downloadperl-a1737d5b9df80320e5be59ab8fa7c96455d6b5bf.tar.gz
[win32] add a txt_compare() routine to t/h2ph.t for DOSISH sanity
p4raw-id: //depot/win32/perl@1054
Diffstat (limited to 't')
-rwxr-xr-xt/lib/h2ph.t10
1 files changed, 8 insertions, 2 deletions
diff --git a/t/lib/h2ph.t b/t/lib/h2ph.t
index a486feb6d2..17d5509085 100755
--- a/t/lib/h2ph.t
+++ b/t/lib/h2ph.t
@@ -8,9 +8,15 @@ BEGIN {
@INC = '../lib';
}
-use File::Compare;
print "1..2\n";
+# quickly compare two text files
+sub txt_compare {
+ local ($/, $A, $B);
+ for (($A,$B) = @_) { open(_,"<$_") ? $_ = <_> : die "$_ : $!"; close _ }
+ $A cmp $B;
+}
+
unless(-e '../utils/h2ph') {
print("ok 1\nok 2\n");
# i'll probably get in trouble for this :)
@@ -20,7 +26,7 @@ unless(-e '../utils/h2ph') {
print(($ok == 0 ? "" : "not "), "ok 1\n");
# does it work? well, does it do what we expect? :-)
- $ok = compare("lib/h2ph.ph", "lib/h2ph.pht");
+ $ok = txt_compare("lib/h2ph.ph", "lib/h2ph.pht");
print(($ok == 0 ? "" : "not "), "ok 2\n");
# cleanup - should this be in an END block?