lists.lazy.tests: plugs file descriptor leak

db4
Björn Lindqvist 2014-09-24 22:14:46 +02:00 committed by John Benediktsson
parent 5fe8dd7604
commit 239deaeaaa
1 changed files with 15 additions and 7 deletions

View File

@ -1,7 +1,7 @@
! Copyright (C) 2006 Matthew Willis and Chris Double.
! See http://factorcode.org/license.txt for BSD license.
USING: io io.encodings.utf8 io.files kernel lists lists.lazy
math sequences tools.test ;
USING: destructors io io.encodings.utf8 io.files kernel lists
lists.lazy math sequences tools.test ;
IN: lists.lazy.tests
[ { 1 2 3 4 } ] [
@ -16,15 +16,15 @@ IN: lists.lazy.tests
{ 1 2 3 } >list { 4 5 } >list lcartesian-product list>array
] unit-test
[ { 5 6 6 7 7 8 } ] [
[ { 5 6 6 7 7 8 } ] [
{ 1 2 3 } >list { 4 5 } >list 2list [ first2 + ] lcomp list>array
] unit-test
[ { 5 6 7 8 } ] [
[ { 5 6 7 8 } ] [
{ 1 2 3 } >list { 4 5 } >list 2list { [ first odd? ] } [ first2 + ] lcomp* list>array
] unit-test
[ { 4 5 6 } ] [
[ { 4 5 6 } ] [
3 { 1 2 3 } >list [ + ] with lazy-map list>array
] unit-test
@ -41,5 +41,13 @@ IN: lists.lazy.tests
[ { 1 2 3 } ] [ { 1 2 3 4 5 } >list [ 2 > ] luntil list>array ] unit-test
[ ] [ "resource:license.txt" utf8 <file-reader> llines list>array drop ] unit-test
[ ] [ "resource:license.txt" utf8 <file-reader> lcontents list>array drop ] unit-test
[ ] [
"resource:license.txt" utf8 <file-reader> [
llines list>array drop
] with-disposal
] unit-test
[ ] [
"resource:license.txt" utf8 <file-reader> [
lcontents list>array drop
] with-disposal
] unit-test