unit test tools.scaffold, fix a bug in scaffolding docs

db4
Doug Coleman 2009-03-28 16:40:34 -05:00
parent 9a7131d000
commit cd0986509c
2 changed files with 23 additions and 2 deletions

View File

@ -0,0 +1,21 @@
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test tools.scaffold unicode.case kernel
multiline tools.scaffold.private io.streams.string ;
IN: tools.scaffold.tests
: undocumented-word ( obj1 obj2 -- obj3 obj4 )
[ >lower ] [ >upper ] bi* ;
[
<" HELP: undocumented-word
{ $values
{ "obj1" object } { "obj2" object }
{ "obj3" object } { "obj4" object }
}
{ $description "" } ;
">
]
[
[ \ undocumented-word (help.) ] with-string-writer
] unit-test

View File

@ -134,7 +134,7 @@ ERROR: no-vocab vocab ;
vocabulary>> using get [ conjoin ] [ drop ] if* ;
: ($values.) ( array -- )
[
[ bl ] [
"{ " write
dup array? [ first ] when
dup lookup-type [
@ -145,7 +145,7 @@ ERROR: no-vocab vocab ;
null add-using
] if
" }" write
] each ;
] interleave ;
: 4bl ( -- )
" " write ; inline