2 USING: alien ui.gadgets.panes ui.gadgets namespaces
3 kernel sequences io io.streams.string tools.test prettyprint
4 definitions help help.syntax help.markup splitting ;
6 : #children "pane" get gadget-children length ;
8 [ ] [ <pane> "pane" set ] unit-test
10 [ ] [ #children "num-children" set ] unit-test
13 "pane" get <pane-stream> [ 10000 [ . ] each ] with-stream*
16 [ t ] [ #children "num-children" get = ] unit-test
19 dup make-pane gadget-text
20 swap string-out "\n" ?tail drop "\n" ?tail drop = ;
22 [ t ] [ [ "hello" write ] test-gadget-text ] unit-test
23 [ t ] [ [ "hello" pprint ] test-gadget-text ] unit-test
24 [ t ] [ [ [ 1 2 3 ] pprint ] test-gadget-text ] unit-test
25 [ t ] [ [ \ = see ] test-gadget-text ] unit-test
26 [ t ] [ [ \ = help ] test-gadget-text ] unit-test
28 ARTICLE: "test-article" "This is a test article"
29 "Hello world, how are you today."
30 { $table { "a" "b" } { "c" "d" } } ;
32 [ t ] [ [ "test-article" help ] test-gadget-text ] unit-test
34 <pane> [ \ = see ] with-pane
35 <pane> [ \ = help ] with-pane