io.files.windows.tests: windows test for the save-image not failing failure #1489

this one really should always throw permission denied or else something
is very spooky
db4
Björn Lindqvist 2015-10-11 04:21:43 +02:00
parent e35087fb22
commit 37cd54cfbb
1 changed files with 15 additions and 2 deletions

View File

@ -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