diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:01:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:01:31 +0000 |
commit | c9cf025fadfe043f0f2f679e10d1207d8a158bb6 (patch) | |
tree | 3a94effe0bdc0a6814d8134f4ed840d7cc6b6f19 /debian/perl-framework/Apache-Test/t/sok.t | |
parent | Adding upstream version 2.4.57. (diff) | |
download | apache2-debian/2.4.57-2.tar.xz apache2-debian/2.4.57-2.zip |
Adding debian version 2.4.57-2.debian/2.4.57-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | debian/perl-framework/Apache-Test/t/sok.t | 168 |
1 files changed, 168 insertions, 0 deletions
diff --git a/debian/perl-framework/Apache-Test/t/sok.t b/debian/perl-framework/Apache-Test/t/sok.t new file mode 100644 index 0000000..cb7efdb --- /dev/null +++ b/debian/perl-framework/Apache-Test/t/sok.t @@ -0,0 +1,168 @@ +#!perl + +use strict; +use warnings FATAL=>'all'; + +use Test (); +use Config (); +unless ($Config::Config{useperlio}) { + print "1..0 # need perlio\n"; + exit 0; +} + +Test::plan tests=>8; + +my $output; +{ + package X0; + use Apache::Test; + + local ($Test::planned, $Test::ntest, %Test::todo); + local *STDOUT; + open STDOUT, '>', \$output; + + local $ENV{HTTPD_TEST_SUBTESTS}=""; + + plan tests=>3; + + sok {1}; + sok {1}; + sok {1}; +} +Test::ok $output=~/^ok 1$/m && + $output=~/^ok 2$/m && + $output=~/^ok 3$/m; + +{ + package Y0; + use Apache::Test qw/-withtestmore/; + + local *STDOUT; + open STDOUT, '>', \$output; + + local $ENV{HTTPD_TEST_SUBTESTS}=""; + + plan tests=>3; + + sok {1}; + sok {1}; + sok {1}; +} +Test::ok $output=~/^ok 1$/m && + $output=~/^ok 2$/m && + $output=~/^ok 3$/m; + +{ + package X0; + + local ($Test::planned, $Test::ntest, %Test::todo); + local *STDOUT; + open STDOUT, '>', \$output; + + local $ENV{HTTPD_TEST_SUBTESTS}="1 3"; + + plan tests=>3; + + sok {1}; + sok {1}; + sok {1}; +} +Test::ok $output=~/^ok 1$/m && + $output=~/^ok 2 # skip skipping this subtest$/mi && + $output=~/^ok 3$/m; + +{ + package Y0; + + local *STDOUT; + open STDOUT, '>', \$output; + + local $ENV{HTTPD_TEST_SUBTESTS}="1 3"; + + plan tests=>3; + + sok {1}; + sok {1}; + sok {1}; +} +Test::ok $output=~/^ok 1$/m && + $output=~/^ok 2 # skip skipping this subtest$/mi && + $output=~/^ok 3$/m; + +{ + package X0; + + local ($Test::planned, $Test::ntest, %Test::todo); + local *STDOUT; + open STDOUT, '>', \$output; + + local $ENV{HTTPD_TEST_SUBTESTS}=""; + + plan tests=>4; + + sok {1}; + sok {ok 1; 1} 2; + sok {1}; +} +Test::ok $output=~/^ok 1$/m && + $output=~/^ok 2$/m && + $output=~/^ok 3$/m && + $output=~/^ok 4$/m; + +{ + package Y0; + + local *STDOUT; + open STDOUT, '>', \$output; + + local $ENV{HTTPD_TEST_SUBTESTS}=""; + + plan tests=>4; + + sok {1}; + sok {ok 1, "erwin"} 2; + sok {1}; +} +Test::ok $output=~/^ok 1$/m && + $output=~/^ok 2 - erwin$/m && + $output=~/^ok 3$/m && + $output=~/^ok 4$/m; + +{ + package X0; + + local ($Test::planned, $Test::ntest, %Test::todo); + local *STDOUT; + open STDOUT, '>', \$output; + + local $ENV{HTTPD_TEST_SUBTESTS}="1 4"; + + plan tests=>4; + + sok {1}; + sok {ok 1; 1} 2; + sok {1}; +} +Test::ok $output=~/^ok 1$/m && + $output=~/^ok 2 # skip skipping this subtest$/mi && + $output=~/^ok 3 # skip skipping this subtest$/mi && + $output=~/^ok 4$/m; + +{ + package Y0; + + local *STDOUT; + open STDOUT, '>', \$output; + + local $ENV{HTTPD_TEST_SUBTESTS}="1 4"; + + plan tests=>4; + + sok {1}; + sok {ok 1} 2; + sok {1}; +} +Test::ok $output=~/^ok 1$/m && + $output=~/^ok 2 # skip skipping this subtest$/mi && + $output=~/^ok 3 # skip skipping this subtest$/mi && + $output=~/^ok 4$/m; |