summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2003-04-28 18:51:47 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2003-04-28 18:51:47 +0000
commit7be8abe5415c30041008f0fd713d1870cc91d221 (patch)
tree434a10683012a8b867835c2cb3d50fa42f548d81
parent427e27cc748ddd206abf5e8a8e97153d0e97cf8c (diff)
downloadphp-git-7be8abe5415c30041008f0fd713d1870cc91d221.tar.gz
Removed bizarre tests for disgusting bugs which have kept annoying us.
- bug #22367 (http://bugs.php.net/22367) - bug #22510 (http://bugs.php.net/22510) - bug #22592 (http://bugs.php.net/22592)
-rw-r--r--tests/lang/bug22367.phpt118
-rw-r--r--tests/lang/bug22510.phpt115
-rw-r--r--tests/lang/bug22592.phpt53
3 files changed, 0 insertions, 286 deletions
diff --git a/tests/lang/bug22367.phpt b/tests/lang/bug22367.phpt
deleted file mode 100644
index fea45bf4bd..0000000000
--- a/tests/lang/bug22367.phpt
+++ /dev/null
@@ -1,118 +0,0 @@
---TEST--
-Bug #22367 (weird zval allocation problem)
---FILE--
-<?php
-class foo
-{
- var $test = array(0, 1, 2, 3, 4);
-
- function a($arg) {
- var_dump(array_key_exists($arg, $this->test));
- return $this->test[$arg];
- }
-
- function b() {
- @$this->c();
-
- $zero = $this->test[0];
- $one = $this->test[1];
- $two = $this->test[2];
- $three = $this->test[3];
- $four = $this->test[4];
- return array($zero, $one, $two, $three, $four);
- }
-
- function c() {
- return $this->a($this->d());
- }
-
- function d() {}
-}
-
-class bar extends foo
-{
- var $i = 0;
- var $idx;
-
- function bar($idx) {
- $this->idx = $idx;
- }
-
- function &a($arg){
- return parent::a($arg);
- }
- function d(){
- return $this->idx;
- }
-}
-
-$a = new bar(5);
-var_dump($a->idx);
-@$a->c();
-$b = $a->b();
-var_dump($b);
-var_dump($a->test);
-
-$a = new bar(2);
-var_dump($a->idx);
-@$a->c();
-$b = $a->b();
-var_dump($b);
-var_dump($a->test);
-
-?>
---EXPECT--
-int(5)
-bool(false)
-bool(false)
-array(5) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
-}
-array(5) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
-}
-int(2)
-bool(true)
-bool(true)
-array(5) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
-}
-array(5) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
-}
diff --git a/tests/lang/bug22510.phpt b/tests/lang/bug22510.phpt
deleted file mode 100644
index ce5ce01358..0000000000
--- a/tests/lang/bug22510.phpt
+++ /dev/null
@@ -1,115 +0,0 @@
---TEST--
-Bug #22510 (segfault among complex references)
---FILE--
-<?php
-class foo
-{
- var $list = array();
-
- function finalize() {
- print __CLASS__."::".__FUNCTION__."\n";
- $cl = &$this->list;
- }
-
- function &method1() {
- print __CLASS__."::".__FUNCTION__."\n";
- return @$this->foo;
- }
-
- function &method2() {
- print __CLASS__."::".__FUNCTION__."\n";
- return $this->foo;
- }
-
- function method3() {
- print __CLASS__."::".__FUNCTION__."\n";
- return @$this->foo;
- }
-}
-
-class bar
-{
- function run1() {
- print __CLASS__."::".__FUNCTION__."\n";
- $this->instance = new foo();
- $this->instance->method1($this);
- $this->instance->method1($this);
- }
-
- function run2() {
- print __CLASS__."::".__FUNCTION__."\n";
- $this->instance = new foo();
- $this->instance->method2($this);
- $this->instance->method2($this);
- }
-
- function run3() {
- print __CLASS__."::".__FUNCTION__."\n";
- $this->instance = new foo();
- $this->instance->method3($this);
- $this->instance->method3($this);
- }
-}
-
-function ouch(&$bar) {
- print __FUNCTION__."\n";
- @$a = $a;
- $bar->run1();
-}
-
-function ok1(&$bar) {
- print __FUNCTION__."\n";
- $bar->run1();
-}
-
-function ok2(&$bar) {
- print __FUNCTION__."\n";
- @$a = $a;
- $bar->run2();
-}
-
-function ok3(&$bar) {
- print __FUNCTION__."\n";
- @$a = $a;
- $bar->run3();
-}
-
-$bar = &new bar();
-ok1($bar);
-$bar->instance->finalize();
-print "done!\n";
-ok2($bar);
-$bar->instance->finalize();
-print "done!\n";
-ok3($bar);
-$bar->instance->finalize();
-print "done!\n";
-ouch($bar);
-$bar->instance->finalize();
-print "I'm alive!\n";
-?>
---EXPECT--
-ok1
-bar::run1
-foo::method1
-foo::method1
-foo::finalize
-done!
-ok2
-bar::run2
-foo::method2
-foo::method2
-foo::finalize
-done!
-ok3
-bar::run3
-foo::method3
-foo::method3
-foo::finalize
-done!
-ouch
-bar::run1
-foo::method1
-foo::method1
-foo::finalize
-I'm alive!
diff --git a/tests/lang/bug22592.phpt b/tests/lang/bug22592.phpt
deleted file mode 100644
index e4e68b1184..0000000000
--- a/tests/lang/bug22592.phpt
+++ /dev/null
@@ -1,53 +0,0 @@
---TEST--
-Bug #22592 (cascading assignments to strings with curly braces broken)
---FILE--
-<?php
-function error_hdlr($errno, $errstr) {
- echo "[$errstr]\n";
-}
-
-set_error_handler('error_hdlr');
-
-$i = 4;
-$s = "string";
-
-$result = "* *-*";
-var_dump($result);
-$result{6} = '*';
-var_dump($result);
-$result{1} = $i;
-var_dump($result);
-$result{3} = $s;
-var_dump($result);
-$result{7} = 0;
-var_dump($result);
-$a = $result{1} = $result{3} = '-';
-var_dump($result);
-$b = $result{3} = $result{5} = $s;
-var_dump($result);
-$c = $result{0} = $result{2} = $result{4} = $i;
-var_dump($result);
-$d = $result{6} = $result{8} = 5;
-var_dump($result);
-$e = $result{1} = $result{6};
-var_dump($result);
-var_dump($a, $b, $c, $d, $e);
-$result{-1} = 'a';
-?>
---EXPECT--
-string(5) "* *-*"
-string(7) "* *-* *"
-string(7) "*4*-* *"
-string(7) "*4*s* *"
-string(8) "*4*s* *0"
-string(8) "*-*-* *0"
-string(8) "*-*s*s*0"
-string(8) "4-4s4s*0"
-string(9) "4-4s4s505"
-string(9) "454s4s505"
-string(1) "-"
-string(6) "string"
-int(4)
-int(5)
-string(1) "5"
-[Illegal string offset: -1]