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/t/php/strings3.t | |
parent | Adding upstream version 2.4.38. (diff) | |
download | apache2-debian.tar.xz apache2-debian.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/t/php/strings3.t')
-rw-r--r-- | debian/perl-framework/t/php/strings3.t | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/debian/perl-framework/t/php/strings3.t b/debian/perl-framework/t/php/strings3.t new file mode 100644 index 0000000..e53519f --- /dev/null +++ b/debian/perl-framework/t/php/strings3.t @@ -0,0 +1,55 @@ +use strict; +use warnings FATAL => 'all'; + +use Apache::Test; +use Apache::TestUtil; +use Apache::TestRequest; + +my $result = GET_BODY "/php/strings3.php"; +my @res = split /\n/, $result; +my $count = @res; + +plan tests => $count + 1, need_php; + +my $expected = <<EXPECT; +printf test 1:simple string +printf test 2:42 +printf test 3:3.333333 +printf test 4:3.3333333333 +printf test 5:2.50 +printf test 6:2.50000000 +printf test 7:0000002.50 +printf test 8:< foo> +printf test 9:<bar > +printf test 10: 123456789012345 +printf test 10:<høyesterettsjustitiarius> +printf test 11: 123456789012345678901234567890 +printf test 11:< høyesterettsjustitiarius> +printf test 12:-12.34 +printf test 13: -12 +printf test 14:@ +printf test 15:10101010 +printf test 16:aa +printf test 17:AA +printf test 18: 10101010 +printf test 19: aa +printf test 20: AA +printf test 21:0000000010101010 +printf test 22:00000000000000aa +printf test 23:00000000000000AA +printf test 24:abcde +printf test 25:gazonk +printf test 26:2 1 +printf test 27:3 1 2 +printf test 28:02 1 +printf test 29:2 1 +EXPECT + +my @exp = split /\n/, $expected; +my $count2 = @exp; + +ok $count eq $count2; + +foreach (my $i = 0 ; $i < $count ; $i++) { + ok t_cmp("[".$res[$i]."]", "[".$exp[$i]."]", "test $i"); +} |