[win32] merge changes#1014,1038 from maintbranch
[p5sagit/p5-mst-13.2.git] / t / lib / h2ph.t
1 #!./perl
2
3 # quickie tests to see if h2ph actually runs and does more or less what is
4 # expected
5
6 BEGIN {
7     chdir 't' if -d 't';
8     @INC = '../lib';
9 }
10
11 use File::Compare;
12 print "1..2\n";
13
14 unless(-e '../utils/h2ph') {
15     print("ok 1\nok 2\n");
16     # i'll probably get in trouble for this :)
17 } else {
18     # does it run?
19     $ok = system("./perl -I../lib ../utils/h2ph -d. lib/h2ph.h");
20     print(($ok == 0 ? "" : "not "), "ok 1\n");
21     
22     # does it work? well, does it do what we expect? :-)
23     $ok = compare("lib/h2ph.ph", "lib/h2ph.pht");
24     print(($ok == 0 ? "" : "not "), "ok 2\n");
25     
26     # cleanup - should this be in an END block?
27     unlink("lib/h2ph.ph");
28 }