]> gitweb.factorcode.org Git - factor.git/blob - basis/ui/operations/operations-tests.factor
6e4e7c3a5dc3b20c30b4cd1df92575d59a35693d
[factor.git] / basis / ui / operations / operations-tests.factor
1 IN: ui.operations.tests
2 USING: ui.operations ui.commands prettyprint kernel namespaces
3 tools.test ui.gadgets ui.gadgets.editors parser io
4 io.streams.string math help help.markup accessors ;
5
6 : my-pprint pprint ;
7
8 [ drop t ] \ my-pprint [ ] [ ] f operation boa "op" set
9
10 [ [ 3 my-pprint ] ] [
11     3 "op" get command>> command-quot
12 ] unit-test
13
14 [ "3" ] [ [ 3 "op" get invoke-command ] with-string-writer ] unit-test
15
16 [ drop t ] \ my-pprint [ ] [ editor-string ] f operation boa
17 "op" set
18
19 [ "\"4\"" ] [
20     [
21         "4" <editor> [ set-editor-string ] keep
22         "op" get invoke-command
23     ] with-string-writer
24 ] unit-test
25
26 [ ] [
27     [ { $operations \ + } print-element ] with-string-writer drop
28 ] unit-test