]> gitweb.factorcode.org Git - factor.git/commitdiff
io.files.windows: Add a unit test to make sure shared flags stay on.
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 30 May 2016 19:24:17 +0000 (12:24 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 30 May 2016 19:24:17 +0000 (12:24 -0700)
basis/io/files/windows/windows-tests.factor

index 29f12f11f13cd1f3992773ffbd0f4e559bbe582e..c5c7a1ff03f54a641578aca538fa58b4ad1538a3 100644 (file)
@@ -2,7 +2,8 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: combinators continuations io.backend io.directories io.files
 io.files.temp io.files.windows io.pathnames kernel kernel.private libc
-literals memory sequences splitting tools.test windows.kernel32 ;
+literals memory sequences splitting tools.test windows.kernel32
+io.files.unique destructors ;
 IN: io.files.windows.tests
 
 [ f ] [ "\\foo" absolute-path? ] unit-test
@@ -78,3 +79,11 @@ IN: io.files.windows.tests
         } cleave
     ] [ ] recover
 ] unit-test
+
+! test that we can open a shared file
+! https://github.com/factor/factor/pull/1636
+{ } [
+    "open-file-" "-test.txt" [
+        [ open-write ] [ open-read ] bi [ dispose ] bi@
+    ] cleanup-unique-file
+] unit-test