factor/library/test/parsing-word.factor

24 lines
385 B
Factor
Raw Normal View History

IN: scratchpad
USE: parser
USE: test
2004-10-27 23:13:00 -04:00
USE: words
USE: strings
USE: kernel
DEFER: foo
": foo 2 2 + . ; parsing" eval
[ [ ] ] [ "foo" parse ] unit-test
": foo 2 2 + . ;" eval
[ [ foo ] ] [ "foo" parse ] unit-test
2004-10-27 23:13:00 -04:00
! Test > 1 ( ) comment; only the first one should be used.
[ t ] [
2005-02-07 18:42:33 -05:00
"a" ": foo ( a ) ( b ) ;" parse drop word
"stack-effect" word-prop str-contains?
2004-10-27 23:13:00 -04:00
] unit-test