From 3494576ad8068688d670f1384f5879a4e5b80c45 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 30 May 2016 12:24:17 -0700 Subject: [PATCH] io.files.windows: Add a unit test to make sure shared flags stay on. --- basis/io/files/windows/windows-tests.factor | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/basis/io/files/windows/windows-tests.factor b/basis/io/files/windows/windows-tests.factor index 29f12f11f1..c5c7a1ff03 100644 --- a/basis/io/files/windows/windows-tests.factor +++ b/basis/io/files/windows/windows-tests.factor @@ -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