summaryrefslogtreecommitdiffstats
path: root/debian/perl-framework/t/php/func3.t
diff options
context:
space:
mode:
Diffstat (limited to 'debian/perl-framework/t/php/func3.t')
-rw-r--r--debian/perl-framework/t/php/func3.t204
1 files changed, 204 insertions, 0 deletions
diff --git a/debian/perl-framework/t/php/func3.t b/debian/perl-framework/t/php/func3.t
new file mode 100644
index 0000000..e5e347b
--- /dev/null
+++ b/debian/perl-framework/t/php/func3.t
@@ -0,0 +1,204 @@
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestRequest;
+
+plan tests => 1, need_php4;
+
+my $expected = <<EXPECT;
+hey
+blah
+hey
+blah
+Counting from 7 to 14
+7
+8
+9
+10
+11
+12
+13
+14
+hey
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+factorial(5) = 120
+factorial(6) = 720
+factorial(7) = 5040
+factorial(8) = 40320
+factorial(9) = 362880
+factorial(10) = 3628800
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+factorial(5) = 120
+factorial(6) = 720
+factorial(7) = 5040
+factorial(8) = 40320
+factorial(9) = 362880
+factorial(10) = 3628800
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+factorial(5) = 120
+factorial(6) = 720
+factorial(7) = 5040
+factorial(8) = 40320
+factorial(9) = 362880
+factorial(10) = 3628800
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+factorial(5) = 120
+factorial(6) = 720
+factorial(7) = 5040
+factorial(8) = 40320
+factorial(9) = 362880
+factorial(10) = 3628800
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+factorial(5) = 120
+factorial(6) = 720
+factorial(7) = 5040
+factorial(8) = 40320
+factorial(9) = 362880
+factorial(10) = 3628800
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+factorial(5) = 120
+factorial(6) = 720
+factorial(7) = 5040
+factorial(8) = 40320
+factorial(9) = 362880
+factorial(10) = 3628800
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+factorial(5) = 120
+factorial(6) = 720
+factorial(7) = 5040
+factorial(8) = 40320
+factorial(9) = 362880
+factorial(10) = 3628800
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+factorial(5) = 120
+factorial(6) = 720
+factorial(7) = 5040
+factorial(8) = 40320
+factorial(9) = 362880
+factorial(10) = 3628800
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+factorial(5) = 120
+factorial(6) = 720
+factorial(7) = 5040
+factorial(8) = 40320
+factorial(9) = 362880
+factorial(10) = 3628800
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+factorial(5) = 120
+factorial(6) = 720
+factorial(7) = 5040
+factorial(8) = 40320
+factorial(9) = 362880
+factorial(10) = 3628800
+and now, from a function...
+(it should break at 5...)
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+(it should break at 5...)
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+(it should break at 5...)
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+(it should break at 5...)
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+(it should break at 5...)
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+(it should break at 5...)
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+(it should break at 5...)
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+(it should break at 5...)
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+(it should break at 5...)
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+(it should break at 5...)
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+------
+720
+840
+3
+4
+5
+EXPECT
+
+my $result = GET_BODY "/php/func3.php";
+ok $result eq $expected;