summaryrefslogtreecommitdiff
path: root/t/lib/h2ph.t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-29 02:31:44 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-29 02:31:44 +0000
commit1d2dff63f533f62282a700198c67c41dcb6ad6df (patch)
tree7eac820768f3a944fd0395294df59cec1ad9bedc /t/lib/h2ph.t
parentbe44fb0e48bd19a864cf6b6d066beef8e960db7d (diff)
downloadperl-1d2dff63f533f62282a700198c67c41dcb6ad6df.tar.gz
[win32] merge changes#1014,1038 from maintbranch
p4raw-link: @1038 on //depot/maint-5.004/perl: c3cf4c2be38f0215f451c3dd6cb13089e5f2329f p4raw-link: @1014 on //depot/maint-5.004/perl: d14230f9721c31ac6e9e2fdb706c7fc95118b4e6 p4raw-id: //depot/win32/perl@1052
Diffstat (limited to 't/lib/h2ph.t')
-rwxr-xr-xt/lib/h2ph.t28
1 files changed, 28 insertions, 0 deletions
diff --git a/t/lib/h2ph.t b/t/lib/h2ph.t
new file mode 100755
index 0000000000..a486feb6d2
--- /dev/null
+++ b/t/lib/h2ph.t
@@ -0,0 +1,28 @@
+#!./perl
+
+# quickie tests to see if h2ph actually runs and does more or less what is
+# expected
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+use File::Compare;
+print "1..2\n";
+
+unless(-e '../utils/h2ph') {
+ print("ok 1\nok 2\n");
+ # i'll probably get in trouble for this :)
+} else {
+ # does it run?
+ $ok = system("./perl -I../lib ../utils/h2ph -d. lib/h2ph.h");
+ 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");
+ print(($ok == 0 ? "" : "not "), "ok 2\n");
+
+ # cleanup - should this be in an END block?
+ unlink("lib/h2ph.ph");
+}