diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-07 02:04:07 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-07 02:04:07 +0000 |
commit | 1221c736f9a90756d47ea6d28320b6b83602dd2a (patch) | |
tree | b453ba7b1393205258c9b098a773b4330984672f /debian/perl-framework/Apache-Test/t/sok.t | |
parent | Adding upstream version 2.4.38. (diff) | |
download | apache2-1221c736f9a90756d47ea6d28320b6b83602dd2a.tar.xz apache2-1221c736f9a90756d47ea6d28320b6b83602dd2a.zip |
Adding debian version 2.4.38-3+deb10u8.debian/2.4.38-3+deb10u8debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/perl-framework/Apache-Test/t/sok.t')
-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; |