]> granicus.if.org Git - php/commitdiff
fix test
authorGreg Beaver <cellog@php.net>
Fri, 14 Dec 2007 05:22:53 +0000 (05:22 +0000)
committerGreg Beaver <cellog@php.net>
Fri, 14 Dec 2007 05:22:53 +0000 (05:22 +0000)
ext/phar/tests/027.phpt
ext/phar/tests/030.phpt
ext/phar/tests/031.phpt
ext/phar/tests/phar_buildfromiterator8.phpt
ext/phar/tests/phar_dir_iterate.phpt
ext/phar/tests/phar_oo_002.phpt
ext/phar/tests/phar_oo_005.phpt
ext/phar/tests/phar_oo_007.phpt

index 7dc7913ccd16746a75c0cd57635de9a6d52a1191..6b6c1eece800054b9f0201186a36ea9ecc314fa7 100755 (executable)
@@ -11,10 +11,10 @@ $pname = 'phar://' . $fname;
 $file = "<?php __HALT_COMPILER(); ?>";
 
 $files = array();
-$files['a.php']   = '<?php echo "This is a\n"; require "'.$pname.'/b.php"; ?>';      
-$files['b.php']   = '<?php echo "This is b\n"; require "'.$pname.'/b/c.php"; ?>';    
-$files['b/c.php'] = '<?php echo "This is b/c\n"; require "'.$pname.'/b/d.php"; ?>';  
-$files['b/d.php'] = '<?php echo "This is b/d\n"; require "'.$pname.'/e.php"; ?>';    
+$files['a.php']   = '<?php echo "This is a\n"; require \''.$pname.'/b.php\'; ?>';      
+$files['b.php']   = '<?php echo "This is b\n"; require \''.$pname.'/b/c.php\'; ?>';    
+$files['b/c.php'] = '<?php echo "This is b/c\n"; require \''.$pname.'/b/d.php\'; ?>';  
+$files['b/d.php'] = '<?php echo "This is b/d\n"; require \''.$pname.'/e.php\'; ?>';    
 $files['e.php']   = '<?php echo "This is e\n"; ?>';                                  
 
 include 'phar_test.inc';
index f8f9c12a26ae6db76b9ad216c216fd2f7781327d..cd0a41b3115ffb59204763e17b53fb41ceb0d952 100755 (executable)
@@ -11,10 +11,10 @@ $pname = 'phar://' . $fname;
 $file = '<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>';
 
 $files = array();
-$files['a.php']   = '<?php echo "This is a\n"; include "'.$pname.'/b.php"; ?>';      
-$files['b.php']   = '<?php echo "This is b\n"; include "'.$pname.'/b/c.php"; ?>';    
-$files['b/c.php'] = '<?php echo "This is b/c\n"; include "'.$pname.'/b/d.php"; ?>';  
-$files['b/d.php'] = '<?php echo "This is b/d\n"; include "'.$pname.'/e.php"; ?>';    
+$files['a.php']   = '<?php echo "This is a\n"; include \''.$pname.'/b.php\'; ?>';      
+$files['b.php']   = '<?php echo "This is b\n"; include \''.$pname.'/b/c.php\'; ?>';    
+$files['b/c.php'] = '<?php echo "This is b/c\n"; include \''.$pname.'/b/d.php\'; ?>';  
+$files['b/d.php'] = '<?php echo "This is b/d\n"; include \''.$pname.'/e.php\'; ?>';    
 $files['e.php']   = '<?php echo "This is e\n"; ?>';                                  
 
 include 'phar_test.inc';
index 94c14d5194fb542624a7ddd7f6ba98c40be03f22..67efe8562208eb77067b8e2ee4656bcded3a3f1e 100755 (executable)
@@ -28,4 +28,4 @@ __halt_compiler();
 --EXPECTF--
 string(25) "<?php echo new new class;"
 
-Parse error: %s error%sunexpected%s in phar://%sphar_oo_test.phar.php/a.php on line %d
+Parse error: %s error%s in phar://%sphar_oo_test.phar.php/a.php on line %d
index a48b0404fb341c1fe075162f47c415f2739671a0..7e9307ecc53bc2b58ded76796ee1d616b2d5d66b 100644 (file)
@@ -22,73 +22,73 @@ try {
 unlink(dirname(__FILE__) . '/buildfromiterator.phar');
 __HALT_COMPILER();
 ?>
---EXPECT--
+--EXPECTF--
 array(33) {
   ["001.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/001.phpt"
+  string(51) "%s001.phpt"
   ["002.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/002.phpt"
+  string(51) "%s002.phpt"
   ["003.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/003.phpt"
+  string(51) "%s003.phpt"
   ["004.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/004.phpt"
+  string(51) "%s004.phpt"
   ["005.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/005.phpt"
+  string(51) "%s005.phpt"
   ["006.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/006.phpt"
+  string(51) "%s006.phpt"
   ["007.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/007.phpt"
+  string(51) "%s007.phpt"
   ["008.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/008.phpt"
+  string(51) "%s008.phpt"
   ["009.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/009.phpt"
+  string(51) "%s009.phpt"
   ["010.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/010.phpt"
+  string(51) "%s010.phpt"
   ["011.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/011.phpt"
+  string(51) "%s011.phpt"
   ["012.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/012.phpt"
+  string(51) "%s012.phpt"
   ["013.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/013.phpt"
+  string(51) "%s013.phpt"
   ["014.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/014.phpt"
+  string(51) "%s014.phpt"
   ["015.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/015.phpt"
+  string(51) "%s015.phpt"
   ["016.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/016.phpt"
+  string(51) "%s016.phpt"
   ["017.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/017.phpt"
+  string(51) "%s017.phpt"
   ["018.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/018.phpt"
+  string(51) "%s018.phpt"
   ["019.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/019.phpt"
+  string(51) "%s019.phpt"
   ["020.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/020.phpt"
+  string(51) "%s020.phpt"
   ["021.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/021.phpt"
+  string(51) "%s021.phpt"
   ["022.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/022.phpt"
+  string(51) "%s022.phpt"
   ["023.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/023.phpt"
+  string(51) "%s023.phpt"
   ["024.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/024.phpt"
+  string(51) "%s024.phpt"
   ["025.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/025.phpt"
+  string(51) "%s025.phpt"
   ["026.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/026.phpt"
+  string(51) "%s026.phpt"
   ["027.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/027.phpt"
+  string(51) "%s027.phpt"
   ["028.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/028.phpt"
+  string(51) "%s028.phpt"
   ["029.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/029.phpt"
+  string(51) "%s029.phpt"
   ["030.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/030.phpt"
+  string(51) "%s030.phpt"
   ["031.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/031.phpt"
+  string(51) "%s031.phpt"
   ["032.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/032.phpt"
+  string(51) "%s032.phpt"
   ["033.phpt"]=>
-  string(51) "/home/cellog/workspace/php5/ext/phar/tests/033.phpt"
+  string(51) "%s033.phpt"
 }
 ===DONE===
index a0a283a862b9f9a3d07bcfb60cb6ca89dd3e1cad..9bc125a0547653c1d8b05169c48b6a3879016260 100644 (file)
@@ -25,7 +25,7 @@ unlink(dirname(__FILE__) . '/test.phar');
 __halt_compiler();
 ?>
 --EXPECTF--
-string(%d) "phar://%stest.phar/another.file.txt"
-string(%d) "phar://%stest.phar/sub/top.txt"
-string(%d) "phar://%stest.phar/top.txt"
+string(%d) "phar://%stest.phar%canother.file.txt"
+string(%d) "phar://%stest.phar%csub%ctop.txt"
+string(%d) "phar://%stest.phar%ctop.txt"
 ===DONE===
index 080df2c61aa08c8aadc3ce2c179c73001fce2714..18c5f69e4304680f78b2251aa4e5562654df2e41 100755 (executable)
@@ -36,7 +36,7 @@ $phar = new Phar($fname);
 foreach(new RecursiveIteratorIterator($phar) as $name => $ent)
 {
        var_dump(str_replace(dirname(__FILE__), '*', $name));
-       var_dump($ent->getFilename());
+       var_dump(str_replace('\\', '/', $ent->getFilename()));
        var_dump($ent->getCompressedSize());
        var_dump($ent->isCRCChecked());
        var_dump($ent->isCRCChecked() ? $ent->getCRC32() : NULL);
index c3d0c29bb27c1f106badda1deb780882749182b3..4c3d3a1e976a3251027ca35dcf53140a18647dc5 100755 (executable)
@@ -15,8 +15,8 @@ $it = new RecursiveIteratorIterator($it);
 
 foreach($it as $name => $ent)
 {
-       var_dump(str_replace($fname, '*', $name));
-       var_dump(str_replace($fname, '*', $ent->getPathname()));
+       var_dump(str_replace(array('\\', $fname), array('/', '*'), $name));
+       var_dump(str_replace(array('\\', $fname), array('/', '*'), $ent->getPathname()));
        var_dump($it->getSubPath());
        var_dump($it->getSubPathName());
        $sub = $it->getPathInfo();
index d294cd043f04139def11541b0df2bfd633966715..4a3acb5b328e1a2444b2b0ac9ea1de99d402564c 100755 (executable)
@@ -14,7 +14,7 @@ class MyFile extends SplFileObject
 {
        function __construct($name)
        {
-               echo __METHOD__ . "(" . str_replace(dirname(__FILE__), '*', $name) . ")\n";
+               echo __METHOD__ . "(" . str_replace(str_replace('\\', '/', dirname(__FILE__)), '*', $name) . ")\n";
                parent::__construct($name);
        }
 }