From 1bd35e6f625fc257ef677ccbc50696b9db0eafec Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Thu, 26 Feb 2009 19:58:25 -0600 Subject: [PATCH] better io.mmap test --- basis/io/mmap/mmap-tests.factor | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/basis/io/mmap/mmap-tests.factor b/basis/io/mmap/mmap-tests.factor index 70a1869bd0..a4d55f3c1e 100644 --- a/basis/io/mmap/mmap-tests.factor +++ b/basis/io/mmap/mmap-tests.factor @@ -11,21 +11,11 @@ IN: io.mmap.tests [ "mmap-test-file.txt" temp-file delete-file ] ignore-errors -[ ] -[ "mmap-empty-file.txt" temp-file touch-file ] unit-test +[ "mmap-empty-file.txt" temp-file delete-file ] ignore-errors +[ ] [ "mmap-empty-file.txt" temp-file touch-file ] unit-test -! Test for leaking resources bug on Unix -[ ] [ - 100000 [ - [ - "mmap-empty-file.txt" temp-file [ - drop - ] with-mapped-file - ] [ dup bad-mmap-size? [ drop ] [ rethrow ] if ] recover - ] times - - "asdf" "mmap-asdf-file.txt" temp-file [ ascii set-file-contents ] keep [ + "mmap-empty-file.txt" temp-file [ drop ] with-mapped-file -] unit-test +] [ bad-mmap-size? ] must-fail-with