diff --git a/basis/io/files/windows/windows-tests.factor b/basis/io/files/windows/windows-tests.factor index 812e397219..40e94056ca 100644 --- a/basis/io/files/windows/windows-tests.factor +++ b/basis/io/files/windows/windows-tests.factor @@ -1,7 +1,8 @@ ! Copyright (C) 2010 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: io.backend io.files io.files.windows io.pathnames kernel -sequences splitting tools.test ; +USING: combinators continuations io.backend io.directories io.files +io.files.temp io.files.windows io.pathnames kernel memory sequences +splitting tools.test windows.kernel32 ; IN: io.files.windows.tests [ f ] [ "\\foo" absolute-path? ] unit-test @@ -65,3 +66,15 @@ IN: io.files.windows.tests } [ 3 win32-file-attributes ] unit-test + +! set-file-attributes & save-image +{ { "kernel-error" 1 13 f } } [ + [ + "read-only.image" temp-file { + [ ?delete-file ] + [ touch-file ] + [ FILE_ATTRIBUTE_READONLY set-file-attributes ] + [ save-image ] + } cleave + ] [ ] recover +] unit-test