io.directories.search: Add two tests for find-up-to-directory, one that finds a file and one that doesn't.

db4
Doug Coleman 2015-05-08 21:02:29 -07:00
parent e1e29b7647
commit f2c67d6ab4
1 changed files with 10 additions and 0 deletions

View File

@ -35,3 +35,13 @@ IN: io.directories.search.tests
[ [ file-name "abcd" = ] find-all-in-directories length 2 = ]
[ [ delete-tree ] each ] tri
] unit-test
{ t } [
"resource:core/math/integers/integers.factor"
[ "math.factor" tail? ] find-up-to-root >boolean
] unit-test
{ f } [
"resource:core/math/integers/integers.factor"
[ drop f ] find-up-to-root
] unit-test