]> granicus.if.org Git - php/commitdiff
win32 should have different test
authorStanislav Malyshev <stas@php.net>
Tue, 8 Dec 2009 01:52:57 +0000 (01:52 +0000)
committerStanislav Malyshev <stas@php.net>
Tue, 8 Dec 2009 01:52:57 +0000 (01:52 +0000)
ext/standard/tests/file/realpath_cache.phpt
ext/standard/tests/file/realpath_cache_win32.phpt [new file with mode: 0644]

index 1e19486c490de8dca07cf0871052395c9ea431ff..567f0e2c71094edddf37591f9ebb775781835550 100644 (file)
@@ -1,5 +1,11 @@
 --TEST--
 realpath_cache_size() and realpath_cache_get()
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+    die('skip not on Windows');
+}
+?>
 --FILE--
 <?php
 
diff --git a/ext/standard/tests/file/realpath_cache_win32.phpt b/ext/standard/tests/file/realpath_cache_win32.phpt
new file mode 100644 (file)
index 0000000..16fc412
--- /dev/null
@@ -0,0 +1,38 @@
+--TEST--
+realpath_cache_size() and realpath_cache_get()
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+    die('skip only on Windows');
+}
+?>
+--FILE--
+<?php
+
+var_dump(realpath_cache_size());
+$data = realpath_cache_get();
+var_dump($data[__DIR__]);
+
+echo "Done\n";
+?>
+--EXPECTF--    
+int(%d)
+array(8) {
+  ["key"]=>
+  int(%d)
+  ["is_dir"]=>
+  bool(true)
+  ["realpath"]=>
+  string(%d) "%sfile"
+  ["expires"]=>
+  int(%d)
+  ["is_rvalid"]=>
+  bool(%s)
+  ["is_wvalid"]=>
+  bool(%s)
+  ["is_readable"]=>
+  bool(%s)
+  ["is_writable"]=>
+  bool(%s)
+}
+Done