2 USING: documents namespaces tools.test ;
6 [ { 10 4 } ] [ { "a" } { 10 3 } text+loc ] unit-test
7 [ { 10 4 } ] [ { "a" } { 10 3 } text+loc ] unit-test
11 "Hello world,\nhow are you?\nMore text"
12 "doc" get set-doc-string
13 { 10 0 } "doc" get validate-loc
18 "Hello world,\nhow are you?\nMore text"
19 "doc" get set-doc-string
20 { 1 20 } "doc" get validate-loc
23 [ " world,\nhow are you?\nMore" ] [
25 "Hello world,\nhow are you?\nMore text"
26 "doc" get set-doc-string
27 { 0 5 } { 2 4 } "doc" get doc-range
30 [ "Hello world,\nhow you?\nMore text" ] [
32 "Hello world,\nhow are you?\nMore text"
33 "doc" get set-doc-string
34 { 1 3 } { 1 7 } "doc" get remove-doc-range
38 [ "Hello world,\nhow text" ] [
40 "Hello world,\nhow are you?\nMore text"
41 "doc" get set-doc-string
42 { 1 3 } { 2 4 } "doc" get remove-doc-range
46 [ "Hello world,\nhow you?\nMore text" ] [
48 "Hello world,\nhow are you?\nMore text"
49 "doc" get set-doc-string
50 "" { 1 3 } { 1 7 } "doc" get set-doc-range
54 [ "Hello world,\nhow text" ] [
56 "Hello world,\nhow are you?\nMore text"
57 "doc" get set-doc-string
58 "" { 1 3 } { 2 4 } "doc" get set-doc-range
63 "Hello world" "doc" get set-doc-string
64 [ { 0 0 } ] [ { 0 0 } "doc" get T{ one-word-elt } prev-elt ] unit-test
65 [ { 0 0 } ] [ { 0 2 } "doc" get T{ one-word-elt } prev-elt ] unit-test
66 [ { 0 0 } ] [ { 0 5 } "doc" get T{ one-word-elt } prev-elt ] unit-test
67 [ { 0 5 } ] [ { 0 2 } "doc" get T{ one-word-elt } next-elt ] unit-test
68 [ { 0 5 } ] [ { 0 5 } "doc" get T{ one-word-elt } next-elt ] unit-test
71 "Hello\nworld, how are\nyou?" "doc" get set-doc-string
73 [ { 2 4 } ] [ "doc" get doc-end ] unit-test
75 [ { 0 0 } ] [ { 0 3 } "doc" get T{ line-elt } prev-elt ] unit-test
76 [ { 0 3 } ] [ { 1 3 } "doc" get T{ line-elt } prev-elt ] unit-test
77 [ { 2 4 } ] [ { 2 1 } "doc" get T{ line-elt } next-elt ] unit-test