summaryrefslogtreecommitdiff
path: root/tests/func
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2004-01-25 12:03:25 +0000
committerSVN Migration <svn@php.net>2004-01-25 12:03:25 +0000
commit22476b36ce621bdd115493bab84cbe706e422a7c (patch)
tree1124d1c5af68860a78c2252bb0dac63c9f18156e /tests/func
parenteb7aca4ea896b09cb9afc2466a46f4720acc4a4e (diff)
downloadphp-git-php_ibase_before_split.tar.gz
This commit was manufactured by cvs2svn to create tagphp_ibase_before_split
'php_ibase_before_split'.
Diffstat (limited to 'tests/func')
-rw-r--r--tests/func/001.phpt6
-rw-r--r--tests/func/002.phpt22
-rw-r--r--tests/func/003.phpt289
-rw-r--r--tests/func/004.phpt65
-rw-r--r--tests/func/005.phpt19
-rw-r--r--tests/func/005a.phpt28
-rw-r--r--tests/func/006.phpt26
-rw-r--r--tests/func/007.phpt22
-rw-r--r--tests/func/008.phpt16
-rw-r--r--tests/func/009.phpt16
10 files changed, 0 insertions, 509 deletions
diff --git a/tests/func/001.phpt b/tests/func/001.phpt
deleted file mode 100644
index d08040679b..0000000000
--- a/tests/func/001.phpt
+++ /dev/null
@@ -1,6 +0,0 @@
---TEST--
-Strlen() function test
---FILE--
-<?php echo strlen("abcdef")?>
---EXPECT--
-6
diff --git a/tests/func/002.phpt b/tests/func/002.phpt
deleted file mode 100644
index 84e00eeeb5..0000000000
--- a/tests/func/002.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-Static variables in functions
---SKIPIF--
-<?php if(version_compare(zend_version(), "2.0.0-dev", '>=')) echo "skip removed in Zend Engine 2\n"; ?>
---FILE--
-<?php
-old_function blah (
- static $hey=0,$yo=0;
-
- echo "hey=".$hey++.", ",$yo--."\n";
-);
-
-blah();
-blah();
-blah();
-if (isset($hey) || isset($yo)) {
- echo "Local variables became global :(\n";
-}
---EXPECT--
-hey=0, 0
-hey=1, -1
-hey=2, -2
diff --git a/tests/func/003.phpt b/tests/func/003.phpt
deleted file mode 100644
index 8afaf8a326..0000000000
--- a/tests/func/003.phpt
+++ /dev/null
@@ -1,289 +0,0 @@
---TEST--
-General function test
---SKIPIF--
-<?php if(version_compare(zend_version(), "2.0.0-dev", '>=')) echo "skip removed in Zend Engine 2\n"; ?>
---FILE--
-<?php
-
-old_function a (
- echo "hey\n";
-);
-
-function b($i)
-{
- echo "$i\n";
-}
-
-
-function c($i,$j)
-{
- echo "Counting from $i to $j\n";
- for ($k=$i; $k<=$j; $k++) {
- echo "$k\n";
- }
-}
-
-
-
-a();
-b("blah");
-a();
-b("blah","blah");
-c(7,14);
-
-a();
-
-
-old_function factorial $n (
- if ($n==0 || $n==1) {
- return 1;
- } else {
- return factorial($n-1)*$n;
- }
-);
-
-
-function factorial2($start, $n)
-{
- if ($n<=$start) {
- return $start;
- } else {
- return factorial2($start,$n-1)*$n;
- }
-}
-
-
-for ($k=0; $k<10; $k++) {
- for ($i=0; $i<=10; $i++) {
- $n=factorial($i);
- echo "factorial($i) = $n\n";
- }
-}
-
-
-echo "and now, from a function...\n";
-
-old_function call_fact (
- echo "(it should break at 5...)\n";
- for ($i=0; $i<=10; $i++) {
- if ($i == 5) break;
- $n=factorial($i);
- echo "factorial($i) = $n\n";
- }
-);
-
-old_function return4 ( return 4; );
-old_function return7 ( return 7; );
-
-for ($k=0; $k<10; $k++) {
- call_fact();
-}
-
-echo "------\n";
-$result = factorial(factorial(3));
-echo "$result\n";
-
-$result=factorial2(return4(),return7());
-echo "$result\n";
-
-old_function andi $i, $j (
- for ($k=$i ; $k<=$j ; $k++) {
- if ($k >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
deleted file mode 100644
index 7ef452be66..0000000000
--- a/tests/func/004.phpt
+++ /dev/null
@@ -1,65 +0,0 @@
---TEST--
-General function test
---SKIPIF--
-<?php if(version_compare(zend_version(), "2.0.0-dev", '>=')) echo "skip removed in Zend Engine 2\n"; ?>
---FILE--
-<?php
-
-echo "Before function declaration...\n";
-
-old_function print_something_multiple_times $something,$times (
- echo "----\nIn function, printing the string \"$something\" $times times\n";
- for ($i=0; $i<$times; $i++) {
- echo "$i) $something\n";
- }
- echo "Done with function...\n-----\n";
-);
-
-old_function some_other_function (
- echo "This is some other function, to ensure more than just one function works fine...\n";
-);
-
-
-echo "After function declaration...\n";
-
-echo "Calling function for the first time...\n";
-print_something_multiple_times("This works!",10);
-echo "Returned from function call...\n";
-
-echo "Calling the function for the second time...\n";
-print_something_multiple_times("This like, really works and stuff...",3);
-echo "Returned from function call...\n";
-
-some_other_function();
-
-?>
---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
deleted file mode 100644
index c4215feb49..0000000000
--- a/tests/func/005.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-Testing register_shutdown_function()
---FILE--
-<?php
-
-function foo()
-{
- print "foo";
-}
-
-register_shutdown_function("foo");
-
-print "foo() will be called on shutdown...\n";
-
-?>
---EXPECT--
-foo() will be called on shutdown...
-foo
-
diff --git a/tests/func/005a.phpt b/tests/func/005a.phpt
deleted file mode 100644
index f7843e10a3..0000000000
--- a/tests/func/005a.phpt
+++ /dev/null
@@ -1,28 +0,0 @@
---TEST--
-Testing register_shutdown_function() with timeout. (Bug: #21513)
---FILE--
-<?php
-
-ini_set('display_errors', 0);
-
-echo "Start\n";
-
-function boo()
-{
- echo "Shutdown\n";
-}
-
-register_shutdown_function("boo");
-
-/* not necessary, just to show the error sooner */
-set_time_limit(1);
-
-/* infinite loop to simulate long processing */
-for (;;) {}
-
-echo "End\n";
-
-?>
---EXPECT--
-Start
-Shutdown
diff --git a/tests/func/006.phpt b/tests/func/006.phpt
deleted file mode 100644
index 077b6f873c..0000000000
--- a/tests/func/006.phpt
+++ /dev/null
@@ -1,26 +0,0 @@
---TEST--
-Output buffering tests
---INI--
-output_buffering=0
-output_handler=
-zlib.output_compression=0
-zlib.output_handler=
---FILE--
-<?php
-ob_start();
-echo ob_get_level();
-echo 'A';
- ob_start();
- echo ob_get_level();
- echo 'B';
- $b = ob_get_contents();
- ob_end_clean();
-$a = ob_get_contents();
-ob_end_clean();
-
-var_dump( $b ); // 2B
-var_dump( $a ); // 1A
-?>
---EXPECT--
-string(2) "2B"
-string(2) "1A"
diff --git a/tests/func/007.phpt b/tests/func/007.phpt
deleted file mode 100644
index 73aae2e649..0000000000
--- a/tests/func/007.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-INI functions test
---FILE--
-<?php
-
-$ini1 = ini_get('include_path');
-ini_set('include_path','ini_set_works');
-echo ini_get('include_path')."\n";
-ini_restore('include_path');
-$ini2 = ini_get('include_path');
-
-if ($ini1 !== $ini2) {
- echo "ini_restore() does not work.\n";
-}
-else {
- echo "ini_restore_works\n";
-}
-
-?>
---EXPECT--
-ini_set_works
-ini_restore_works
diff --git a/tests/func/008.phpt b/tests/func/008.phpt
deleted file mode 100644
index 48098e1330..0000000000
--- a/tests/func/008.phpt
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-Test for buffering in core functions with implicit flush off
---INI--
-implicit_flush=0
---FILE--
-<?php
-$res = var_export("foo1");
-echo "\n";
-$res = var_export("foo2", TRUE);
-echo "\n";
-echo $res."\n";
-?>
---EXPECT--
-'foo1'
-
-'foo2'
diff --git a/tests/func/009.phpt b/tests/func/009.phpt
deleted file mode 100644
index 05b40e8e67..0000000000
--- a/tests/func/009.phpt
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-Test for buffering in core functions with implicit flush on
---INI--
-implicit_flush=1
---FILE--
-<?php
-$res = var_export("foo1");
-echo "\n";
-$res = var_export("foo2", TRUE);
-echo "\n";
-echo $res."\n";
-?>
---EXPECT--
-'foo1'
-
-'foo2'