sniper          Mon Jan 19 19:25:31 2004 EDT

  Added files:                 
    /php-src/tests/lang bug26696.phpt 
  Log:
  test case for bug #26696
  

http://cvs.php.net/co.php/php-src/tests/lang/bug26696.phpt?r=1.1&p=1
Index: php-src/tests/lang/bug26696.phpt
+++ php-src/tests/lang/bug26696.phpt
--TEST--
Bug #26696 (string index in a switch() crashes with multiple matches)
--FILE--
<?php

$str = 'asdd/?';
$len = strlen($str);
for ($i = 0; $i < $len; $i++) {
        switch ($str{$i}) {
                case '?':
                        echo "OK\n";
                        break;
        }
}

$str = '*';
switch ($str{0}) { 
        case '*';
                echo "OK\n";
                break;
        default:
                echo 'Default RAN!';
}

?>
--EXPECT--
OK
OK

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to