mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
fix one part - can't get the ereg() to match on windows, will fix when I figure out why
This commit is contained in:
parent
2c4e1f1d4a
commit
6f1625d29b
1 changed files with 6 additions and 1 deletions
|
@ -12,6 +12,10 @@ error_reporting(E_ALL);
|
|||
require_once 'System.php';
|
||||
|
||||
$sep = DIRECTORY_SEPARATOR;
|
||||
$ereg_sep = $sep;
|
||||
if (OS_WINDOWS) {
|
||||
$ereg_sep .= $sep;
|
||||
}
|
||||
|
||||
/*******************
|
||||
mkDir
|
||||
|
@ -58,11 +62,12 @@ $tmpfile = System::mkTemp('tst');
|
|||
$tmpenv = System::tmpDir();
|
||||
if (!@is_file($tmpfile) || !ereg("^$tmpenv{$sep}tst", $tmpfile)) {
|
||||
print "System::mkTemp('tst') failed\n";
|
||||
var_dump(is_file($tmpfile), $tmpfile, "^$tmpenv{$sep}tst", !ereg("^$tmpenv{$ereg_sep}tst", $tmpfile));
|
||||
}
|
||||
|
||||
// Create a temporal dir in "dir1" with default prefix "tmp"
|
||||
$tmpdir = System::mkTemp('-d -t dir1');
|
||||
if (!@is_dir($tmpdir) || !ereg("^dir1{$sep}tmp", $tmpdir)) {
|
||||
if (!@is_dir($tmpdir) || !ereg("^dir1{$ereg_sep}tmp", $tmpdir)) {
|
||||
print "System::mkTemp('-d -t dir1') failed\n";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue