]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/documents/documents-tests.factor
factor: Retrying on the unit tests. Also normalize some syntax with FUNCTION:.
[factor.git] / basis / documents / documents-tests.factor
index 41d93c889ec4acf9c5f32b56f85f4a7f53337014..2bbab6db971ebf6beef8d6b10f5dc79b009cd841 100644 (file)
@@ -4,28 +4,28 @@ IN: documents.tests
 
 ! Tests
 
-[ { } ] [
+{ { } } [
     [
         { 1 10 }
         { 1 10 } [ , "HI" , ] each-line
     ] { } make
 ] unit-test
 
-[ { 1 "HI" } ] [
+{ { 1 "HI" } } [
     [
         { 1 10 }
         { 1 11 } [ , "HI" , ] each-line
     ] { } make
 ] unit-test
 
-[ { 1 "HI" 2 "HI" } ] [
+{ { 1 "HI" 2 "HI" } } [
     [
         { 1 10 }
         { 2 11 } [ , "HI" , ] each-line
     ] { } make
 ] unit-test
 
-[ { { t f 1 } { t f 2 } } ] [
+{ { { t f 1 } { t f 2 } } } [
     [
         { 1 10 } { 2 11 }
         t f
@@ -33,31 +33,31 @@ IN: documents.tests
     ] { } make
 ] unit-test
 
-[ { 10 4 } ] [ { "a" } { 10 3 } text+loc ] unit-test
-[ { 10 4 } ] [ { "a" } { 10 3 } text+loc ] unit-test
+{ { 10 4 } } [ { "a" } { 10 3 } text+loc ] unit-test
+{ { 10 4 } } [ { "a" } { 10 3 } text+loc ] unit-test
 
-[ { 2 9 } ] [
+{ { 2 9 } } [
     <document> "doc" set
     "Hello world,\nhow are you?\nMore text"
     "doc" get set-doc-string
     { 10 0 } "doc" get validate-loc
 ] unit-test
 
-[ { 1 12 } ] [
+{ { 1 12 } } [
     <document> "doc" set
     "Hello world,\nhow are you?\nMore text"
     "doc" get set-doc-string
     { 1 20 } "doc" get validate-loc
 ] unit-test
 
-[ " world,\nhow are you?\nMore" ] [
+{ " world,\nhow are you?\nMore" } [
     <document> "doc" set
     "Hello world,\nhow are you?\nMore text"
     "doc" get set-doc-string
     { 0 5 } { 2 4 } "doc" get doc-range
 ] unit-test
 
-[ "Hello world,\nhow you?\nMore text" ] [
+{ "Hello world,\nhow you?\nMore text" } [
     <document> "doc" set
     "Hello world,\nhow are you?\nMore text"
     "doc" get set-doc-string
@@ -65,7 +65,7 @@ IN: documents.tests
     "doc" get doc-string
 ] unit-test
 
-[ "Hello world,\nhow text" ] [
+{ "Hello world,\nhow text" } [
     <document> "doc" set
     "Hello world,\nhow are you?\nMore text"
     "doc" get set-doc-string
@@ -73,7 +73,7 @@ IN: documents.tests
     "doc" get doc-string
 ] unit-test
 
-[ "Hello world,\nhow you?\nMore text" ] [
+{ "Hello world,\nhow you?\nMore text" } [
     <document> "doc" set
     "Hello world,\nhow are you?\nMore text"
     "doc" get set-doc-string
@@ -81,7 +81,7 @@ IN: documents.tests
     "doc" get doc-string
 ] unit-test
 
-[ "Hello world,\nhow text" ] [
+{ "Hello world,\nhow text" } [
     <document> "doc" set
     "Hello world,\nhow are you?\nMore text"
     "doc" get set-doc-string
@@ -92,14 +92,14 @@ IN: documents.tests
 <document> "doc" set
 "Hello\nworld, how are\nyou?" "doc" get set-doc-string
 
-[ { 2 4 } ] [ "doc" get doc-end ] unit-test
+{ { 2 4 } } [ "doc" get doc-end ] unit-test
 
 ! Undo/redo
-[ ] [ <document> "d" set ] unit-test
+{ } [ <document> "d" set ] unit-test
 
-[ ] [ "Hello, world." "d" get set-doc-string ] unit-test
+{ } [ "Hello, world." "d" get set-doc-string ] unit-test
 
-[
+{
     T{ edit
        { old-string "" }
        { new-string "Hello, world." }
@@ -107,47 +107,47 @@ IN: documents.tests
        { old-to { 0 0 } }
        { new-to { 0 13 } }
     }
-] [ "d" get undos>> first ] unit-test
+} [ "d" get undos>> first ] unit-test
 
-[ ] [ "Goodbye" { 0 0 } { 0 5 } "d" get set-doc-range ] unit-test
+{ } [ "Goodbye" { 0 0 } { 0 5 } "d" get set-doc-range ] unit-test
 
-[ "Goodbye, world." ] [ "d" get doc-string ] unit-test
+{ "Goodbye, world." } [ "d" get doc-string ] unit-test
 
-[ ] [ "cruel " { 0 9 } { 0 9 } "d" get set-doc-range ] unit-test
+{ } [ "cruel " { 0 9 } { 0 9 } "d" get set-doc-range ] unit-test
 
-[ 3 ] [ "d" get undos>> length ] unit-test
+{ 3 } [ "d" get undos>> length ] unit-test
 
-[ "Goodbye, cruel world." ] [ "d" get doc-string ] unit-test
+{ "Goodbye, cruel world." } [ "d" get doc-string ] unit-test
 
-[ "" { 0 9 } { 0 15 } ] [
+{ "" { 0 9 } { 0 15 } } [
     "d" get undos>> last
     [ old-string>> ] [ from>> ] [ new-to>> ] tri
 ] unit-test
 
-[ ] [ "d" get undo ] unit-test
+{ } [ "d" get undo ] unit-test
 
-[ "Goodbye, world." ] [ "d" get doc-string ] unit-test
+{ "Goodbye, world." } [ "d" get doc-string ] unit-test
 
-[ ] [ "d" get undo ] unit-test
+{ } [ "d" get undo ] unit-test
 
-[ "Hello, world." ] [ "d" get doc-string ] unit-test
+{ "Hello, world." } [ "d" get doc-string ] unit-test
 
-[ ] [ "d" get redo ] unit-test
+{ } [ "d" get redo ] unit-test
 
-[ "Goodbye, world." ] [ "d" get doc-string ] unit-test
+{ "Goodbye, world." } [ "d" get doc-string ] unit-test
 
-[ ] [ <document> "d" set ] unit-test
+{ } [ <document> "d" set ] unit-test
 
-[ ] [ "d" get clear-doc ] unit-test
+{ } [ "d" get clear-doc ] unit-test
 
-[ ] [ "d" get clear-doc ] unit-test
+{ } [ "d" get clear-doc ] unit-test
 
-[ 0 ] [ "d" get undos>> length ] unit-test
+{ 0 } [ "d" get undos>> length ] unit-test
 
-[ ] [ <document> "d" set ] unit-test
+{ } [ <document> "d" set ] unit-test
 
-[ ] [ "d" get value>> "value" set ] unit-test
+{ } [ "d" get value>> "value" set ] unit-test
 
-[ ] [ "Hello world" "d" get set-doc-string ] unit-test
+{ } [ "Hello world" "d" get set-doc-string ] unit-test
 
-[ { "" } ] [ "value" get ] unit-test
+{ { "" } } [ "value" get ] unit-test