2 USING: documents namespaces tools.test make arrays kernel fry ;
9 { 1 10 } [ , "HI" , ] each-line
16 { 1 11 } [ , "HI" , ] each-line
20 [ { 1 "HI" 2 "HI" } ] [
23 { 2 11 } [ , "HI" , ] each-line
27 [ { { t f 1 } { t f 2 } } ] [
31 '[ [ _ _ ] dip 3array , ] each-line
35 [ { 10 4 } ] [ { "a" } { 10 3 } text+loc ] unit-test
36 [ { 10 4 } ] [ { "a" } { 10 3 } text+loc ] unit-test
40 "Hello world,\nhow are you?\nMore text"
41 "doc" get set-doc-string
42 { 10 0 } "doc" get validate-loc
47 "Hello world,\nhow are you?\nMore text"
48 "doc" get set-doc-string
49 { 1 20 } "doc" get validate-loc
52 [ " world,\nhow are you?\nMore" ] [
54 "Hello world,\nhow are you?\nMore text"
55 "doc" get set-doc-string
56 { 0 5 } { 2 4 } "doc" get doc-range
59 [ "Hello world,\nhow you?\nMore text" ] [
61 "Hello world,\nhow are you?\nMore text"
62 "doc" get set-doc-string
63 { 1 3 } { 1 7 } "doc" get remove-doc-range
67 [ "Hello world,\nhow text" ] [
69 "Hello world,\nhow are you?\nMore text"
70 "doc" get set-doc-string
71 { 1 3 } { 2 4 } "doc" get remove-doc-range
75 [ "Hello world,\nhow you?\nMore text" ] [
77 "Hello world,\nhow are you?\nMore text"
78 "doc" get set-doc-string
79 "" { 1 3 } { 1 7 } "doc" get set-doc-range
83 [ "Hello world,\nhow text" ] [
85 "Hello world,\nhow are you?\nMore text"
86 "doc" get set-doc-string
87 "" { 1 3 } { 2 4 } "doc" get set-doc-range
92 "Hello world" "doc" get set-doc-string
93 [ { 0 0 } ] [ { 0 0 } "doc" get T{ one-word-elt } prev-elt ] unit-test
94 [ { 0 0 } ] [ { 0 2 } "doc" get T{ one-word-elt } prev-elt ] unit-test
95 [ { 0 0 } ] [ { 0 5 } "doc" get T{ one-word-elt } prev-elt ] unit-test
96 [ { 0 5 } ] [ { 0 2 } "doc" get T{ one-word-elt } next-elt ] unit-test
97 [ { 0 5 } ] [ { 0 5 } "doc" get T{ one-word-elt } next-elt ] unit-test
100 "Hello\nworld, how are\nyou?" "doc" get set-doc-string
102 [ { 2 4 } ] [ "doc" get doc-end ] unit-test
104 [ { 0 0 } ] [ { 0 3 } "doc" get T{ line-elt } prev-elt ] unit-test
105 [ { 0 3 } ] [ { 1 3 } "doc" get T{ line-elt } prev-elt ] unit-test
106 [ { 2 4 } ] [ { 2 1 } "doc" get T{ line-elt } next-elt ] unit-test