3 # quickie tests to see if h2ph actually runs and does more or less what is
8 unshift @INC, '../lib';
13 # quickly compare two text files
16 for (($A,$B) = @_) { open(_,"<$_") ? $_ = <_> : die "$_ : $!"; close _ }
20 unless(-e '../utils/h2ph') {
21 print("ok 1\nok 2\n");
22 # i'll probably get in trouble for this :)
25 $ok = system("./perl -I../lib ../utils/h2ph -d. -Q lib/h2ph.h");
26 print(($ok == 0 ? "" : "not "), "ok 1\n");
28 # does it work? well, does it do what we expect? :-)
29 $ok = txt_compare("lib/h2ph.ph", "lib/h2ph.pht");
30 print(($ok == 0 ? "" : "not "), "ok 2\n");
32 # cleanup - should this be in an END block?
33 unlink("lib/h2ph.ph");