]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/documents/documents-tests.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / basis / documents / documents-tests.factor
index c4bc1528c3767539be24cb9da61fe742e9775d8f..41d93c889ec4acf9c5f32b56f85f4a7f53337014 100644 (file)
@@ -1,6 +1,6 @@
-IN: documents.tests
 USING: documents documents.private accessors sequences
 namespaces tools.test make arrays kernel fry ;
+IN: documents.tests
 
 ! Tests
 
@@ -89,6 +89,11 @@ namespaces tools.test make arrays kernel fry ;
     "doc" get doc-string
 ] unit-test
 
+<document> "doc" set
+"Hello\nworld, how are\nyou?" "doc" get set-doc-string
+
+[ { 2 4 } ] [ "doc" get doc-end ] unit-test
+
 ! Undo/redo
 [ ] [ <document> "d" set ] unit-test
 
@@ -115,7 +120,7 @@ namespaces tools.test make arrays kernel fry ;
 [ "Goodbye, cruel world." ] [ "d" get doc-string ] unit-test
 
 [ "" { 0 9 } { 0 15 } ] [
-    "d" get undos>> peek
+    "d" get undos>> last
     [ old-string>> ] [ from>> ] [ new-to>> ] tri
 ] unit-test
 
@@ -145,4 +150,4 @@ namespaces tools.test make arrays kernel fry ;
 
 [ ] [ "Hello world" "d" get set-doc-string ] unit-test
 
-[ { "" } ] [ "value" get ] unit-test
\ No newline at end of file
+[ { "" } ] [ "value" get ] unit-test