]> granicus.if.org Git - php/commitdiff
Make zlib include_path tests more robust
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 10 Apr 2019 11:39:17 +0000 (13:39 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 10 Apr 2019 11:39:17 +0000 (13:39 +0200)
One file is placed inside the script directory, we need to make
sure it has a unique name as well.

ext/zlib/tests/gzfile_variation15.phpt
ext/zlib/tests/gzopen_variation4.phpt
ext/zlib/tests/readgzfile_variation15.phpt
ext/zlib/tests/reading_include_path.inc

index 153f56715bc5783877e10999818451e7336ed955..866348efa0e93f03db08b85ae150b0fb2be86435 100644 (file)
@@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
 ?>
 --FILE--
 <?php
-$thisTestDir = 'gzfile_variation15.dir';
+$testName = 'gzfile_variation15';
 require_once('reading_include_path.inc');
 
 //define the files to go into these directories, create one in dir2
index baa9c715aeb544eebf4ffe01b006dc21dc793a7b..1648b75fb96fd1856467d6b8e70eb2aba47119d3 100644 (file)
@@ -16,7 +16,7 @@ if (!extension_loaded("zlib")) {
 
 echo "*** Testing gzopen() : usage variation ***\n";
 
-$thisTestDir = 'gzopen_variation4.dir';
+$testName = 'gzopen_variation4';
 require_once('reading_include_path.inc');
 
 //define the files to go into these directories, create one in dir2
index 40773f7bf012c4f7168cebe7f9cae830d93f8271..48115c7fdb828f0545e3d4d0857c78ee06f6470d 100644 (file)
@@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
 ?>
 --FILE--
 <?php
-$thisTestDir = 'readgzfile_variation15.dir';
+$testName = 'readgzfile_variation15';
 require_once('reading_include_path.inc');
 
 //define the files to go into these directories, create one in dir2
index b4dbbc280464af8e2768d75b673c7e8690e30c2c..99ac44503ad0609d0c8822eb83a93f507325ad19 100644 (file)
@@ -1,10 +1,11 @@
 <?php
+$thisTestDir = $testName . '.dir';
 mkdir($thisTestDir);
 chdir($thisTestDir);
 
 //create the include directory structure
 $workingDir = "workdir";
-$filename = "afile.txt.gz";
+$filename = $testName . ".txt.gz";
 $scriptDir = dirname(__FILE__);
 $baseDir = getcwd();
 $secondFile = $baseDir."/dir2/".$filename;