]> gitweb.factorcode.org Git - factor.git/commitdiff
help.lint.coverage: Clean up test a bit. Hopefully this fixes an error on macOS in...
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 7 Jul 2018 20:40:33 +0000 (15:40 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 7 Jul 2018 20:40:33 +0000 (15:40 -0500)
extra/help/lint/coverage/coverage-tests.factor

index aa98ac31207d26146fbc0f7ec7ea4a99c991c3dc..ada199ab673726caaf1ff35cff4a1f18a8ab08f8 100644 (file)
@@ -71,31 +71,38 @@ PRIVATE>
 
 ! Lint system is written weirdly, there's no way to invoke it and get the output
 ! Instead, it writes to lint-failures.
-{ }
+{ }
 [
     [[
         USING: assocs definitions math kernel namespaces help.syntax
-        help.lint help.lint.private ;
+        help.lint help.lint.private continuations compiler.units ;
         IN: help.lint.tests
         <<
         : add-stuff ( x y -- z ) + ;
 
         HELP: add-stuff ;
         >>
-        H{ } clone lint-failures [ \ add-stuff check-word lint-failures get ] with-variable
-        assoc-empty? [ "help-lint is broken" throw ] when
-        << \ add-stuff forget >>
-    ]] eval( -- )
+        [
+            H{ } clone lint-failures [
+                \ add-stuff check-word lint-failures get
+                assoc-empty? [ "help-lint is broken" throw ] when
+            ] with-variable t
+        ] [
+            [ \ add-stuff forget ] with-compilation-unit
+        ] [
+            f
+        ] cleanup
+    ]] eval( -- ? )
 ] unit-test
 
 
 ! clean up broken words
 [[
-  USING: definitions ;
+  USING: definitions compiler.units ;
   IN: help.lint.coverage.tests.private
-<<
-\ empty forget
-\ nonexistent forget
-\ defined forget
->>
+[
+    \ empty forget
+    \ nonexistent forget
+    \ defined forget
+] with-compilation-unit
 ]] eval( -- )