diff --git a/extra/help/cookbook/cookbook.factor b/extra/help/cookbook/cookbook.factor index 72b300b585..319dd1586b 100755 --- a/extra/help/cookbook/cookbook.factor +++ b/extra/help/cookbook/cookbook.factor @@ -199,7 +199,7 @@ ARTICLE: "cookbook-io" "Input and output cookbook" } "Convert a file of 4-byte cells from little to big endian or vice versa, by directly mapping it into memory and operating on it with sequence words:" { $code - "\"mydata.dat\" dup file-length [" + "\"mydata.dat\" dup file-info file-info-length [" " 4 [ reverse-here ] change-each" "] with-mapped-file" } diff --git a/extra/io/mmap/mmap-tests.factor b/extra/io/mmap/mmap-tests.factor old mode 100644 new mode 100755 index f1c65178d9..be5dc48bf0 --- a/extra/io/mmap/mmap-tests.factor +++ b/extra/io/mmap/mmap-tests.factor @@ -4,7 +4,7 @@ IN: io.mmap.tests [ "mmap-test-file.txt" resource-path delete-file ] ignore-errors [ ] [ "12345" "mmap-test-file.txt" resource-path ascii set-file-contents ] unit-test -[ ] [ "mmap-test-file.txt" resource-path dup file-length [ CHAR: 2 0 pick set-nth drop ] with-mapped-file ] unit-test -[ 5 ] [ "mmap-test-file.txt" resource-path dup file-length [ length ] with-mapped-file ] unit-test +[ ] [ "mmap-test-file.txt" resource-path dup file-info file-info-length [ CHAR: 2 0 pick set-nth drop ] with-mapped-file ] unit-test +[ 5 ] [ "mmap-test-file.txt" resource-path dup file-info file-info-length [ length ] with-mapped-file ] unit-test [ "22345" ] [ "mmap-test-file.txt" resource-path ascii file-contents ] unit-test [ "mmap-test-file.txt" resource-path delete-file ] ignore-errors diff --git a/extra/tools/deploy/deploy-tests.factor b/extra/tools/deploy/deploy-tests.factor index c68c259a6e..408d3d0afb 100755 --- a/extra/tools/deploy/deploy-tests.factor +++ b/extra/tools/deploy/deploy-tests.factor @@ -12,25 +12,25 @@ tools.deploy.backend math sequences io.launcher ; [ ] [ "hello-world" shake-and-bake ] unit-test [ t ] [ - "hello.image" temp-file file-length 500000 <= + "hello.image" temp-file file-info file-info-length 500000 <= ] unit-test [ ] [ "sudoku" shake-and-bake ] unit-test [ t ] [ - "hello.image" temp-file file-length 1500000 <= + "hello.image" temp-file file-info file-info-length 1500000 <= ] unit-test [ ] [ "hello-ui" shake-and-bake ] unit-test [ t ] [ - "hello.image" temp-file file-length 2000000 <= + "hello.image" temp-file file-info file-info-length 2000000 <= ] unit-test [ ] [ "bunny" shake-and-bake ] unit-test [ t ] [ - "hello.image" temp-file file-length 3000000 <= + "hello.image" temp-file file-info file-info-length 3000000 <= ] unit-test [ ] [