From fe155e69a32261aa545dff2ee1aaf76ec1463095 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 15 May 2008 19:08:32 -0500 Subject: [PATCH] Fix mmap tests --- extra/io/mmap/mmap-tests.factor | 5 ----- extra/io/windows/mmap/mmap-tests.factor | 8 ++++++++ 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 extra/io/windows/mmap/mmap-tests.factor diff --git a/extra/io/mmap/mmap-tests.factor b/extra/io/mmap/mmap-tests.factor index d25097e2b0..57faca01c7 100755 --- a/extra/io/mmap/mmap-tests.factor +++ b/extra/io/mmap/mmap-tests.factor @@ -8,8 +8,3 @@ IN: io.mmap.tests [ 5 ] [ "mmap-test-file.txt" temp-file dup file-info size>> [ length ] with-mapped-file ] unit-test [ "22345" ] [ "mmap-test-file.txt" temp-file ascii file-contents ] unit-test [ "mmap-test-file.txt" temp-file delete-file ] ignore-errors - -[ ] [ "a" "mmap-grow-test.txt" temp-file ascii set-file-contents ] unit-test -[ 1 ] [ "mmap-grow-test.txt" temp-file file-info size>> ] unit-test -[ ] [ "mmap-grow-test.txt" temp-file 100 [ drop ] with-mapped-file ] unit-test -[ 100 ] [ "mmap-grow-test.txt" temp-file file-info size>> ] unit-test diff --git a/extra/io/windows/mmap/mmap-tests.factor b/extra/io/windows/mmap/mmap-tests.factor new file mode 100644 index 0000000000..a8430108e8 --- /dev/null +++ b/extra/io/windows/mmap/mmap-tests.factor @@ -0,0 +1,8 @@ +USING: io io.mmap io.files kernel tools.test continuations +sequences io.encodings.ascii accessors ; +IN: io.windows.mmap.tests + +[ ] [ "a" "mmap-grow-test.txt" temp-file ascii set-file-contents ] unit-test +[ 1 ] [ "mmap-grow-test.txt" temp-file file-info size>> ] unit-test +[ ] [ "mmap-grow-test.txt" temp-file 100 [ [ ] change-each ] with-mapped-file ] unit-test +[ 100 ] [ "mmap-grow-test.txt" temp-file file-info size>> ] unit-test