⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 h2ph.t

📁 UNIX下perl实现代码
💻 T
字号:
#!./perl# quickie tests to see if h2ph actually runs and does more or less what is# expectedBEGIN {    chdir 't' if -d 't';    @INC = '../lib';}print "1..2\n";# quickly compare two text filessub 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 :)} else {    # does it run?    $ok = system("./perl -I../lib ../utils/h2ph -d. -Q lib/h2ph.h");    print(($ok == 0 ? "" : "not "), "ok 1\n");        # does it work? well, does it do what we expect? :-)    $ok = txt_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");    unlink("_h2ph_pre.ph");}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -