2008-03-01 17:00:45 -05:00
|
|
|
IN: ui.operations.tests
|
2007-09-20 18:09:08 -04:00
|
|
|
USING: ui.operations ui.commands prettyprint kernel namespaces
|
|
|
|
tools.test ui.gadgets ui.gadgets.editors parser io
|
2008-09-02 02:52:22 -04:00
|
|
|
io.streams.string math help help.markup accessors ;
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2009-03-23 01:34:02 -04:00
|
|
|
: my-pprint ( obj -- ) pprint ;
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2009-01-26 03:21:28 -05:00
|
|
|
[ drop t ] \ my-pprint [ ] f operation boa "op" set
|
2007-09-20 18:09:08 -04:00
|
|
|
|
|
|
|
[ [ 3 my-pprint ] ] [
|
2008-09-02 02:52:22 -04:00
|
|
|
3 "op" get command>> command-quot
|
2007-09-20 18:09:08 -04:00
|
|
|
] unit-test
|
|
|
|
|
2008-02-15 23:20:31 -05:00
|
|
|
[ "3" ] [ [ 3 "op" get invoke-command ] with-string-writer ] unit-test
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2009-01-26 03:21:28 -05:00
|
|
|
[ drop t ] \ my-pprint [ editor-string ] f operation boa
|
2007-09-20 18:09:08 -04:00
|
|
|
"op" set
|
|
|
|
|
2008-01-02 22:07:59 -05:00
|
|
|
[ "\"4\"" ] [
|
2007-09-20 18:09:08 -04:00
|
|
|
[
|
|
|
|
"4" <editor> [ set-editor-string ] keep
|
|
|
|
"op" get invoke-command
|
2008-02-15 23:20:31 -05:00
|
|
|
] with-string-writer
|
2007-09-20 18:09:08 -04:00
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[ ] [
|
2008-02-15 23:20:31 -05:00
|
|
|
[ { $operations \ + } print-element ] with-string-writer drop
|
2007-09-20 18:09:08 -04:00
|
|
|
] unit-test
|