]> gitweb.factorcode.org Git - factor.git/commitdiff
factor: fix some docs/tests from recent merge
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 27 Feb 2023 01:54:05 +0000 (19:54 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 27 Feb 2023 01:54:05 +0000 (19:54 -0600)
basis/see/see-tests.factor
basis/tools/scaffold/scaffold-docs.factor
basis/tools/scaffold/scaffold-tests.factor
core/kernel/kernel-tests.factor
extra/flip-text/flip-text.factor
extra/wordlet/wordlet.factor

index 103e8a6edbe2a1a32c40a4b0ab7d82415c7f1545..b245fc01ccf5970ca01d9f82da787008e77c60da 100644 (file)
@@ -7,7 +7,7 @@ CONSTANT: test-const 10
 { "IN: see.tests\nCONSTANT: test-const 10 inline\n" }
 [ [ \ test-const see ] with-string-writer ] unit-test
 
-{ "IN: sequences\nERROR: non-negative-integer-expected n ;\n" }
+{ "IN: math\nERROR: non-negative-integer-expected n ;\n" }
 [ [ \ non-negative-integer-expected see ] with-string-writer ] unit-test
 
 ALIAS: test-alias +
index aa1c0960cfed7ecff314e14a6cbc08caddb9cdc0..05b00cf5a34b1f7ce85eefba644354cdecc46551 100644 (file)
@@ -13,8 +13,8 @@ HELP: help.
 { $description "Prints out scaffold help markup for a given word." } ;
 
 HELP: scaffold-docs
-{ $values { "vocab" vocab } }
-{ $description "Takes an existing vocabulary and creates a help file with scaffolded help for each word. This word only works if no help file yet exists." } ;
+{ $values { "obj" object } }
+{ $description "Takes a word or vocabulary name and creates a help file with scaffolded help for each word. For vocabulary names, if a file exists this word will not do anything." } ;
 
 HELP: scaffold-undocumented
 { $values
index f62996b7a5f079af1b446965f1a0d1ceceb7a720..6e7070c17fcce2628981a4b06650dd2df33502bf 100644 (file)
@@ -17,7 +17,7 @@ IN: tools.scaffold.tests
 "
 }
 [
-    [ \ undocumented-word (help.) ] with-string-writer
+    [ \ undocumented-word scaffold-word-docs ] with-string-writer
 ] unit-test
 
 {
@@ -25,7 +25,7 @@ IN: tools.scaffold.tests
 { $class-description \"\" } ;
 " }
 [
-    [ \ iota (help.) ] with-string-writer
+    [ \ iota scaffold-word-docs ] with-string-writer
 ] unit-test
 
 { sequence t } [ "seq" lookup-type ] unit-test
@@ -37,4 +37,4 @@ IN: tools.scaffold.tests
 
 : test-maybe ( obj -- obj/f ) ;
 
-{ } [ \ test-maybe (help.) ] unit-test
+{ } [ \ test-maybe scaffold-word-docs ] unit-test
index 4deae90e9403aefb9015a9f3bce1a12ac5eeb048..8baa6ee3c76b63049b0fd79a11baf4151da6195c 100644 (file)
@@ -211,8 +211,8 @@ IN: kernel.tests
 
 { } [ "kernel" reload ] long-unit-test
 
-{ 5 t } [ "5" [ string>number ] call* ] unit-test
-{ "5notanumber" f } [ "5notanumber" [ string>number ] call* ] unit-test
+{ 5 t } [ "5" [ string>number ] ?transmute ] unit-test
+{ "5notanumber" f } [ "5notanumber" [ string>number ] ?transmute ] unit-test
 
 { 10 } [ 5 [ 2 * ] ?call ] unit-test
 { f } [ f [ 2 * ] ?call ] unit-test
index 3c567b0ab7f1b1ad62f209fabeb43d348288be38..7f3a26412599adf950d525f092f06723d726b1f4 100644 (file)
@@ -91,7 +91,7 @@ CONSTANT: CHARS H{
 CHARS [ CHARS set-at ] assoc-each
 
 : ch>flip ( ch -- ch' )
-    dup CHARS at [ nip ] when* ;
+    [ CHARS at ] transmute ;
 
 PRIVATE>
 
index 6ad641531bf63a5e6305b6a075c3d787b295985c..7dfdbda84a10dd5857f8eca42463de2859103cce 100644 (file)
@@ -4,7 +4,7 @@ USING: accessors arrays ascii assocs assocs.extras base91 colors
 combinators hashtables io io.encodings.binary
 io.encodings.string io.encodings.utf8 io.files io.styles kernel
 literals math math.order random ranges sequences
-sequences.extras sets sorting sorting.slots splitting strings ;
+sequences.extras sets sorting.specification splitting strings ;
 IN: wordlet
 
 <PRIVATE
@@ -50,7 +50,7 @@ TUPLE: wordlet-game secret-word chances guesses ;
     ] with map concat members
     [ background of ] assoc-map
     [ drop ] collect-value-by
-    [ [ color>n ] zip-with { >=< } sort-values-by first first ] assoc-map
+    [ [ color>n ] zip-with { >=< } sort-values-with-spec first first ] assoc-map
     CHAR: a CHAR: z [a..b] [ 1string COLOR: white ] { } map>assoc [ or ] assoc-merge ;
 
 : print-remaining-chars ( game -- )