diff options
| author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-02-22 09:43:12 +0100 |
|---|---|---|
| committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-02-22 09:43:12 +0100 |
| commit | f319419d51873c3134e7e8c5681edf23a8d9c4dd (patch) | |
| tree | 438d98210110c5084b0916a384b91abf7730fc4c | |
| parent | 22691f9ef7491de61d31783cffaf6d325c48b63e (diff) | |
| download | php-git-f319419d51873c3134e7e8c5681edf23a8d9c4dd.tar.gz | |
Properly clean up test case
If we had to create an initial $start directory, we should remove it
at the end of the test.
| -rw-r--r-- | ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt index 5cc697c0fc..9dc7cf3cc4 100644 --- a/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt @@ -24,9 +24,11 @@ for ($i = 0; $i < $how_many; $i++) { } $start = realpath(dirname(__FILE__)); +$newstart = false; if (strlen($start) <= 248) { // create the exact length $start = $start . "\\" . str_repeat('a', 251 - strlen($start) - 1); + $newstart = true; } var_dump($start); @@ -47,6 +49,9 @@ for ($i = 0; $i < $how_many; $i++) { $p0 = substr($p, 0, strlen($p) - $i*51); rmdir($p0); } +if ($newstart) { + rmdir($start); +} ?> ===DONE=== |
