]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/io/launcher/unix/unix-tests.factor
factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!
[factor.git] / basis / io / launcher / unix / unix-tests.factor
index d32637c8daee70134281d72e1744118d8a35c4f6..da151182c670606fa9dd293ee6e3023817b42341 100644 (file)
@@ -10,42 +10,42 @@ IN: io.launcher.unix.tests
 : arch-temp-file ( str -- str' )
     "-" my-arch 3append temp-file ;
 
-[ ] [
+{ } [
     [ "launcher-test-1" arch-temp-file delete-file ] ignore-errors
 ] unit-test
 
-[ ] [
+{ } [
     "touch"
     "launcher-test-1" arch-temp-file
     2array
     try-process
 ] unit-test
 
-[ t ] [ "launcher-test-1" arch-temp-file exists? ] unit-test
+{ t } [ "launcher-test-1" arch-temp-file exists? ] unit-test
 
-[ ] [
+{ } [
     [ "launcher-test-1" arch-temp-file delete-file ] ignore-errors
 ] unit-test
 
-[ ] [
+{ } [
     <process>
         "echo Hello" >>command
         "launcher-test-1" arch-temp-file >>stdout
     try-process
 ] unit-test
 
-[ "Hello\n" ] [
+{ "Hello\n" } [
     "cat"
     "launcher-test-1" arch-temp-file
     2array
     ascii <process-reader> stream-contents
 ] unit-test
 
-[ ] [
+{ } [
     [ "launcher-test-1" arch-temp-file delete-file ] ignore-errors
 ] unit-test
 
-[ ] [
+{ } [
     <process>
         "cat" >>command
         +closed+ >>stdin
@@ -53,14 +53,14 @@ IN: io.launcher.unix.tests
     try-process
 ] unit-test
 
-[ "" ] [
+{ "" } [
     "cat"
     "launcher-test-1" arch-temp-file
     2array
     ascii <process-reader> stream-contents
 ] unit-test
 
-[ ] [
+{ } [
     2 [
         "launcher-test-1" arch-temp-file binary <file-appender> [
             <process>
@@ -71,14 +71,14 @@ IN: io.launcher.unix.tests
     ] times
 ] unit-test
 
-[ "Hello\nHello\n" ] [
+{ "Hello\nHello\n" } [
     "cat"
     "launcher-test-1" arch-temp-file
     2array
     ascii <process-reader> stream-contents
 ] unit-test
 
-[ t ] [
+{ t } [
     <process>
         "env" >>command
         { { "A" "B" } } >>environment
@@ -86,7 +86,7 @@ IN: io.launcher.unix.tests
     "A=B" swap member?
 ] unit-test
 
-[ { "A=B" } ] [
+{ { "A=B" } } [
     <process>
         "env" >>command
         { { "A" "B" } } >>environment
@@ -94,7 +94,7 @@ IN: io.launcher.unix.tests
     ascii <process-reader> stream-lines
 ] unit-test
 
-[ "hi\n" ] [
+{ "hi\n" } [
     temp-directory [
         [ "aloha" delete-file ] ignore-errors
         <process>
@@ -108,7 +108,7 @@ IN: io.launcher.unix.tests
 
 [ "append-test" arch-temp-file delete-file ] ignore-errors
 
-[ "hi\nhi\n" ] [
+{ "hi\nhi\n" } [
     2 [
         <process>
             "echo hi" >>command
@@ -118,9 +118,9 @@ IN: io.launcher.unix.tests
     "append-test" arch-temp-file utf8 file-contents
 ] unit-test
 
-[ t ] [ "ls" utf8 <process-stream> stream-contents >boolean ] unit-test
+{ t } [ "ls" utf8 <process-stream> stream-contents >boolean ] unit-test
 
-[ "Hello world.\n" ] [
+{ "Hello world.\n" } [
     "cat" utf8 <process-stream> [
         "Hello world.\n" write
         output-stream get dispose
@@ -151,7 +151,7 @@ IN: io.launcher.unix.tests
 ] [ io-timeout? ] must-fail-with
 
 ! Killed processes were exiting with code 0 on FreeBSD
-[ f ] [
+[ f ] {
     [let
         <promise> :> p
         <promise> :> s
@@ -163,7 +163,7 @@ IN: io.launcher.unix.tests
 
         p 1 seconds ?promise-timeout (kill-process)
         s 3 seconds ?promise-timeout 0 =
-    ]
+    }
 ] unit-test
 
 ! Make sure that subprocesses don't inherit our signal mask
@@ -173,10 +173,10 @@ IN: io.launcher.unix.tests
     "SIGPIPE" signal-names index 1 +
     kill io-error ;
 
-[ ] [ (current-process) send-sigpipe ] unit-test
+{ } [ (current-process) send-sigpipe ] unit-test
 
 ! Spawn a process
-[ T{ signal f 13 } ] [
+{ T{ signal f 13 } } [
     "sleep 1000" run-detached
     1 seconds sleep
     [ handle>> send-sigpipe ]
@@ -186,7 +186,7 @@ IN: io.launcher.unix.tests
 ] unit-test
 
 ! Test priority
-[ 0 ] [
+{ 0 } [
     <process>
         { "bash" "-c" "sleep 2&" } >>command
         +low-priority+ >>priority