]> gitweb.factorcode.org Git - factor.git/commitdiff
Fixing help unit test which was clobbering help lint
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 1 Sep 2008 09:15:01 +0000 (04:15 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 1 Sep 2008 09:15:01 +0000 (04:15 -0500)
basis/help/lint/lint.factor
basis/help/topics/topics-tests.factor

index 14d3420a68bc79c4232554da3d1519d59e53dbdf..b12dcaa8071b7d906ed986aa3dbbb8bd5810957a 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2006, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors sequences parser kernel help help.markup
+USING: fry accessors sequences parser kernel help help.markup
 help.topics words strings classes tools.vocabs namespaces io
 io.streams.string prettyprint definitions arrays vectors
 combinators combinators.short-circuit splitting debugger
@@ -39,7 +39,7 @@ IN: help.lint
         $predicate
         $class-description
         $error-description
-    } swap [ elements f like ] curry contains? ;
+    } swap '[ , elements empty? not ] contains? ;
 
 : check-values ( word element -- )
     {
@@ -108,12 +108,10 @@ M: help-error error.
     articles get keys
     vocabs [ dup vocab-docs-path swap ] H{ } map>assoc
     H{ } clone [
-        [
-            [ dup >link where dup ] 2dip
-            [ >r >r first r> at r> push-at ] 2curry
-            [ 2drop ]
-            if
-        ] 2curry each
+        '[
+            dup >link where dup
+            [ first , at , push-at ] [ 2drop ] if
+        ] each
     ] keep ;
 
 : check-about ( vocab -- )
index 699b2d398a261f55fd2abad1c1ee0a6a873715aa..f53bdee9c7ceb6a3090e746502f9781a604b185c 100644 (file)
@@ -16,7 +16,7 @@ IN: help.topics.tests
 
 SYMBOL: foo
 
-[ ] [ { "test" "a" } "Test A" { { $subsection foo } } <article> add-article ] unit-test
+[ ] [ "Test A" { { $subsection foo } } <article> { "test" "a" } add-article ] unit-test
 
 ! Test article location recording