]> granicus.if.org Git - php/commitdiff
Adding sys_get_temp_dir() test specific for Windows.
authorMatt Ficken <v-mafick@microsoft.com>
Thu, 25 Apr 2013 21:52:48 +0000 (14:52 -0700)
committerMatt Ficken <v-mafick@microsoft.com>
Thu, 25 Apr 2013 21:52:48 +0000 (14:52 -0700)
sys_get_temp_dir() returns a Windows-style path (\\ instead of /) on
Windows. This is why a Windows specific test is required.

Skipping req60524.phpt on Windows. Adding -win32 fork for use only on
Windows.

Fixes test bug #64396.

tests/basic/req60524-win.phpt [new file with mode: 0644]
tests/basic/req60524.phpt

diff --git a/tests/basic/req60524-win.phpt b/tests/basic/req60524-win.phpt
new file mode 100644 (file)
index 0000000..b2e7cfd
--- /dev/null
@@ -0,0 +1,13 @@
+--TEST--
+Req #60524 (Specify temporary directory)
+--INI--
+sys_temp_dir=C:\Windows
+--SKIPIF--
+<?php
+if( substr(PHP_OS, 0, 3) != "WIN" )
+  die('skip Run only on Windows');
+?>
+--FILE--
+<?php echo sys_get_temp_dir(); ?>
+--EXPECT--
+C:\\Windows
index 6803e1fd88bfea3ed984eaa626a7defb5acd062f..7cc3edfabf439bf37b2e8d33a720ebd11332cff7 100644 (file)
@@ -2,6 +2,12 @@
 Req #60524 (Specify temporary directory)
 --INI--
 sys_temp_dir=/path/to/temp/dir
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+    die('skip non-windows only test');
+}
+?>
 --FILE--
 <?php echo sys_get_temp_dir(); ?>
 --EXPECT--