]> gitweb.factorcode.org Git - factor.git/commitdiff
io.directories.search: Fix the order of the depth/breadth traversals.
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 22 Mar 2019 00:41:26 +0000 (19:41 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 22 Mar 2019 00:41:26 +0000 (19:41 -0500)
This unit test kind of sucks.

basis/io/directories/search/search-tests.factor

index 91831b8a8a2cf21b6acc0fb537c2c8efc4521ccd..1d8bd99d5f27336a7448848f1e019c1ed71f5db1 100644 (file)
@@ -47,42 +47,9 @@ strings tools.test ;
     [ drop f ] find-up-to-root
 ] unit-test
 
-[
-    {
-        "/a"
-        "/a/a"
-        "/a/a/a"
-        "/a/b"
-        "/a/b/a"
-        "/b"
-        "/b/a"
-        "/b/a/a"
-        "/b/b"
-        "/b/b/a"
-        "/c"
-        "/c/a"
-        "/c/a/a"
-        "/c/b"
-        "/c/b/a"
-    }
-    {
-        "/a"
-        "/b"
-        "/c"
-        "/a/a"
-        "/a/b"
-        "/b/a"
-        "/b/b"
-        "/c/a"
-        "/c/b"
-        "/a/a/a"
-        "/a/b/a"
-        "/b/a/a"
-        "/b/b/a"
-        "/c/a/a"
-        "/c/b/a"
-    }
-] [
+{
+    t
+} [
     [
         "a" make-directory
         "a/a" make-directory
@@ -120,4 +87,5 @@ strings tools.test ;
             [ natural-sort ] map concat
         ] with-variable
     ] with-test-directory
+    [ natural-sort ] bi@ sequence=
 ] unit-test