📄 test-e-k-k.px
字号:
#!/usr/bin/perl -wuse strict;use HTTPTest;###############################################################################my $mainpage = <<EOF;<html><head> <title>Main Page Title</title></head><body> <a href="http://localhost:8080/subpage.php">Secondary Page</a></body></html>EOFmy $mainpagemangled = <<EOF;<html><head> <title>Main Page Title</title></head><body> <a href="subpage.php.html">Secondary Page</a></body></html>EOFmy $subpage = <<EOF;<html><head> <title>Secondary Page Title</title></head><body> <p>Some text</p></body></html>EOF# code, msg, headers, contentmy %urls = ( '/index.php' => { code => "200", msg => "Dontcare", headers => { "Content-type" => "text/html", }, content => $mainpage, }, '/subpage.php' => { code => "200", msg => "Dontcare", headers => { "Content-type" => "text/html", }, content => $subpage, },);my $cmdline = $WgetTest::WGETPATH . " -d -r -nd -E -k -K http://localhost:8080/index.php";my $expected_error_code = 0;my %expected_downloaded_files = ( 'index.php.orig' => { content => $mainpage, }, 'index.php.html' => { content => $mainpagemangled, }, 'subpage.php.html' => { content => $subpage, },);###############################################################################my $the_test = HTTPTest->new (name => "Test-E-k-K", input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, output => \%expected_downloaded_files);exit $the_test->run();# vim: et ts=4 sw=4
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -