]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.scaffold: need a manifest for mason tests
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 21 Aug 2023 17:19:46 +0000 (10:19 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 21 Aug 2023 17:19:46 +0000 (10:19 -0700)
basis/tools/scaffold/scaffold-tests.factor
basis/tools/scaffold/scaffold.factor

index c9ebddc9b4f0b79366c556bb1df853c85573ab87..15e8848688ae2edeabcd2b290ec252df5ccfc2c4 100644 (file)
@@ -1,7 +1,9 @@
 ! Copyright (C) 2009 Doug Coleman.
 ! See https://factorcode.org/license.txt for BSD license.
+
 USING: help.markup io.streams.string kernel math sequences
 tools.scaffold tools.scaffold.private tools.test unicode ;
+
 IN: tools.scaffold.tests
 
 
@@ -51,20 +53,17 @@ IN: tools.scaffold.tests
 [ [ \ test-maybe scaffold-word-docs ] with-string-writer ]
 unit-test
 
-
-{ "{ \"foofoo\" } [\n    \"foo\" dup append\n] unit-test\n" } [
-    "\"foo\" dup append" [ read-unit-test ] with-string-reader
+{ "{ \"foofoo\" } [\n    USING: kernel sequences ; \"foo\" dup append\n] unit-test\n" } [
+    "USING: kernel sequences ; \"foo\" dup append" [ read-unit-test ] with-string-reader
 ] unit-test
 
-
 {
-    "{\n    \"foobarbazfoobarbazfoobarbazfoobarbazfoobarbazfoobarbazfoobarbazfoobarbaz\"\n} [\n    \"foobarbaz\" 3 [ dup append ] times\n] unit-test\n"
+    "{\n    \"foobarbazfoobarbazfoobarbazfoobarbazfoobarbazfoobarbazfoobarbazfoobarbaz\"\n} [\n    USING: kernel math sequences ; \"foobarbaz\" 3 [ dup append ] times\n] unit-test\n"
 } [
-    "\"foobarbaz\" 3 [ dup append ] times"
+    "USING: kernel math sequences ; \"foobarbaz\" 3 [ dup append ] times"
     [ read-unit-test ] with-string-reader
 ] unit-test
 
-
 { "foobar [\n    baz\n] unit-test\n" } [
     "foobar" "baz" make-unit-test
 ] unit-test
@@ -74,7 +73,6 @@ unit-test
     "foobar" "foz\nbaz" make-unit-test
 ] unit-test
 
-
 { { 2 } } [
-    "2 1 + 3 * 7 -" run-string
+    "USING: math ; 2 1 + 3 * 7 -" run-string
 ] unit-test
index 76377d4a0dee360abf03dc0783a966c211ccec54..7a3f6cc0704ee6161273c004f8941580773edb3e 100644 (file)
@@ -409,7 +409,7 @@ ${example-indent}}
     " " glue ;
 
 : run-string ( string -- datastack )
-    parse-string V{ } clone swap with-datastack ; inline
+    [ parse-string V{ } clone swap with-datastack ] with-file-vocabs ; inline
 
 : read-unit-test ( -- str/f )
     read-contents dup "" = [