From c4dd7a1a684490673e25aaf4fabec5df138854c4 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Thu, 14 Mar 2013 05:42:27 +0000 Subject: Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2. --- tests/func/001.phpt | 6 + tests/func/002.phpt | 21 ++++ tests/func/003.phpt | 291 ++++++++++++++++++++++++++++++++++++++++++++++ tests/func/004.phpt | 65 +++++++++++ tests/func/005.phpt | 19 +++ tests/func/005a.phpt | 32 +++++ tests/func/006.phpt | 26 +++++ tests/func/007.phpt | 22 ++++ tests/func/008.phpt | 16 +++ tests/func/009.phpt | 16 +++ tests/func/010.phpt | 77 ++++++++++++ tests/func/ini_alter.phpt | 19 +++ 12 files changed, 610 insertions(+) create mode 100644 tests/func/001.phpt create mode 100644 tests/func/002.phpt create mode 100644 tests/func/003.phpt create mode 100644 tests/func/004.phpt create mode 100644 tests/func/005.phpt create mode 100644 tests/func/005a.phpt create mode 100644 tests/func/006.phpt create mode 100644 tests/func/007.phpt create mode 100644 tests/func/008.phpt create mode 100644 tests/func/009.phpt create mode 100644 tests/func/010.phpt create mode 100644 tests/func/ini_alter.phpt (limited to 'tests/func') diff --git a/tests/func/001.phpt b/tests/func/001.phpt new file mode 100644 index 0000000..d080406 --- /dev/null +++ b/tests/func/001.phpt @@ -0,0 +1,6 @@ +--TEST-- +Strlen() function test +--FILE-- + +--EXPECT-- +6 diff --git a/tests/func/002.phpt b/tests/func/002.phpt new file mode 100644 index 0000000..cb35f92 --- /dev/null +++ b/tests/func/002.phpt @@ -0,0 +1,21 @@ +--TEST-- +Static variables in functions +--FILE-- +5) continue; + echo "$k\n"; + } +} + +andi (3,10); +--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 + diff --git a/tests/func/004.phpt b/tests/func/004.phpt new file mode 100644 index 0000000..1434297 --- /dev/null +++ b/tests/func/004.phpt @@ -0,0 +1,65 @@ +--TEST-- +General function test +--FILE-- + +--EXPECT-- + +Before function declaration... +After function declaration... +Calling function for the first time... +---- +In function, printing the string "This works!" 10 times +0) This works! +1) This works! +2) This works! +3) This works! +4) This works! +5) This works! +6) This works! +7) This works! +8) This works! +9) This works! +Done with function... +----- +Returned from function call... +Calling the function for the second time... +---- +In function, printing the string "This like, really works and stuff..." 3 times +0) This like, really works and stuff... +1) This like, really works and stuff... +2) This like, really works and stuff... +Done with function... +----- +Returned from function call... +This is some other function, to ensure more than just one function works fine... diff --git a/tests/func/005.phpt b/tests/func/005.phpt new file mode 100644 index 0000000..c4215fe --- /dev/null +++ b/tests/func/005.phpt @@ -0,0 +1,19 @@ +--TEST-- +Testing register_shutdown_function() +--FILE-- + +--EXPECT-- +foo() will be called on shutdown... +foo + diff --git a/tests/func/005a.phpt b/tests/func/005a.phpt new file mode 100644 index 0000000..3c2bcb1 --- /dev/null +++ b/tests/func/005a.phpt @@ -0,0 +1,32 @@ +--TEST-- +Testing register_shutdown_function() with timeout. (Bug: #21513) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +Start +Shutdown diff --git a/tests/func/006.phpt b/tests/func/006.phpt new file mode 100644 index 0000000..077b6f8 --- /dev/null +++ b/tests/func/006.phpt @@ -0,0 +1,26 @@ +--TEST-- +Output buffering tests +--INI-- +output_buffering=0 +output_handler= +zlib.output_compression=0 +zlib.output_handler= +--FILE-- + +--EXPECT-- +string(2) "2B" +string(2) "1A" diff --git a/tests/func/007.phpt b/tests/func/007.phpt new file mode 100644 index 0000000..73aae2e --- /dev/null +++ b/tests/func/007.phpt @@ -0,0 +1,22 @@ +--TEST-- +INI functions test +--FILE-- + +--EXPECT-- +ini_set_works +ini_restore_works diff --git a/tests/func/008.phpt b/tests/func/008.phpt new file mode 100644 index 0000000..48098e1 --- /dev/null +++ b/tests/func/008.phpt @@ -0,0 +1,16 @@ +--TEST-- +Test for buffering in core functions with implicit flush off +--INI-- +implicit_flush=0 +--FILE-- + +--EXPECT-- +'foo1' + +'foo2' diff --git a/tests/func/009.phpt b/tests/func/009.phpt new file mode 100644 index 0000000..05b40e8 --- /dev/null +++ b/tests/func/009.phpt @@ -0,0 +1,16 @@ +--TEST-- +Test for buffering in core functions with implicit flush on +--INI-- +implicit_flush=1 +--FILE-- + +--EXPECT-- +'foo1' + +'foo2' diff --git a/tests/func/010.phpt b/tests/func/010.phpt new file mode 100644 index 0000000..f970283 --- /dev/null +++ b/tests/func/010.phpt @@ -0,0 +1,77 @@ +--TEST-- +function with many parameters +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECT-- +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +Done diff --git a/tests/func/ini_alter.phpt b/tests/func/ini_alter.phpt new file mode 100644 index 0000000..111e826 --- /dev/null +++ b/tests/func/ini_alter.phpt @@ -0,0 +1,19 @@ +--TEST-- +ini_alter() check +--CREDITS-- +Sebastian Schürmann +sebs@php.net +Testfest 2009 Munich +--FILE-- + +--EXPECT-- +string(1) "1" +string(1) "0" + -- cgit v1.2.1