]> gitweb.factorcode.org Git - factor.git/commitdiff
use ?delete-file instead of [ delete-file ] ignore-errors.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 11 Jul 2016 03:28:46 +0000 (20:28 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 11 Jul 2016 03:28:46 +0000 (20:28 -0700)
14 files changed:
basis/concurrency/distributed/distributed-tests.factor
basis/db/pools/pools-tests.factor
basis/db/sqlite/sqlite-tests.factor
basis/furnace/auth/providers/db/db-tests.factor
basis/furnace/sessions/sessions-tests.factor
basis/http/http-tests.factor
basis/io/launcher/unix/unix-tests.factor
basis/tools/deploy/test/test.factor
extra/gdbm/gdbm-tests.factor
extra/site-watcher/site-watcher-tests.factor
extra/webapps/mason/backend/backend-tests.factor
unmaintained/semantic-db/semantic-db-tests.factor
unmaintained/tangle/sandbox/sandbox.factor
unmaintained/tangle/tangle-tests.factor

index 7bb1469fa336544e6aa6fdd7a2d32c63c673604d..83d596cca3f99ffe7b607daaa3dfbe86938b8cf3 100644 (file)
@@ -19,8 +19,9 @@ CONSTANT: test-ip "127.0.0.1"
         { [ os windows? ] [ insecure-addr ] }
     } cond ;
 
-
-{ } [ [ "distributed-concurrency-test" temp-file delete-file ] ignore-errors ] unit-test
+os unix? [
+    "distributed-concurrency-test" temp-file ?delete-file
+] when
 
 test-node-server [
     [ ] [
index 8fba5cf26449a8cf6b0884b89cb114b8ec9d0eb3..e0b0adfd13e6e0eda4417c6fd33b7c86593dde3c 100644 (file)
@@ -9,7 +9,7 @@ io.directories namespaces accessors kernel math destructors ;
 ! Test behavior after image save/load
 USE: db.sqlite
 
-[ "pool-test.db" temp-file delete-file ] ignore-errors
+"pool-test.db" temp-file ?delete-file
 
 { } [ "pool-test.db" temp-file <sqlite-db> <db-pool> "pool" set ] unit-test
 
index 660f33171caaa3438ea5c955a5a1f37801b40ab5..b5866a71f3fc258b8fe8b4f84ff1829684687f25 100644 (file)
@@ -7,7 +7,7 @@ IN: db.sqlite.tests
 : db-path ( -- path ) "test-" cell number>string ".db" 3append temp-file ;
 : test.db ( -- sqlite-db ) db-path <sqlite-db> ;
 
-{ } [ [ db-path delete-file ] ignore-errors ] unit-test
+db-path ?delete-file
 
 { } [
     test.db [
index 41c8cfda3917b1b9fb7100ccb058ab8f84e4f434..d76b0a2527e9dc84d1c428497512ff6585c48538 100644 (file)
@@ -13,7 +13,7 @@ IN: furnace.auth.providers.db.tests
 : auth-test-db-name ( -- string )
     cpu name>> "auth-test." ".db" surround ;
 
-[ auth-test-db-name temp-file delete-file ] ignore-errors
+auth-test-db-name temp-file ?delete-file
 
 auth-test-db-name temp-file <sqlite-db> [
 
index 479a5caa6e159caf135e1dc1053d852ead0862ac..030ebd92542bd5d1a102968c2910712f809a32b2 100644 (file)
@@ -49,7 +49,7 @@ M: foo call-responder*
     <action>
         [ [ ] <text-content> exit-with ] >>display ;
 
-[ "auth-test.db" temp-file delete-file ] ignore-errors
+"auth-test.db" temp-file ?delete-file
 
 "auth-test.db" temp-file <sqlite-db> [
 
index 4ad53ecb64dfc3425d3dfb291c3eaf62fbf1d846..5067e7ea054199a55c6fb351f1ee8c9a27372e1e 100644 (file)
@@ -229,7 +229,7 @@ http.server.dispatchers db.tuples ;
     "Goodbye" assert= ;
 
 { } [
-    [ test-db-file delete-file ] ignore-errors
+    test-db-file ?delete-file
 
     test-db [
         init-furnace-tables
index a07b60b918f20c8380e7f0cda4b4e7bd81baf162..a1913058c03d3f44c8188efd68776154a95589c8 100644 (file)
@@ -13,7 +13,7 @@ IN: io.launcher.unix.tests
     { t } [ "launcher-test-1" exists? ] unit-test
 
     { } [
-        [ "launcher-test-1" delete-file ] ignore-errors
+        "launcher-test-1" ?delete-file
     ] unit-test
 
     { } [
@@ -29,7 +29,7 @@ IN: io.launcher.unix.tests
     ] unit-test
 
     { } [
-        [ "launcher-test-1" delete-file ] ignore-errors
+        "launcher-test-1" ?delete-file
     ] unit-test
 
     { } [
index 3925e06e5c6e45b883292e4513eff7e06397782c..d90ee2caf995bdf820188d4c3624e0662dc5db55 100644 (file)
@@ -11,7 +11,7 @@ IN: tools.deploy.test
     test-image temp-file ;
 
 : shake-and-bake ( vocab -- )
-    [ test-image-path delete-file ] ignore-errors
+    test-image-path ?delete-file
     [
         [ vm-path test-image temp-file ] dip
         dup deploy-config make-deploy-image drop
index c9e32f3f883e9596693d790adb8bb2acac21151b..d50e9729142fc5f69d06fe5fd70b763bcc6d4cc5 100644 (file)
@@ -6,7 +6,7 @@ IN: gdbm.tests
 
 : db-path ( -- filename ) cpu name>> "-test.db" append temp-file ;
 
-: CLEANUP ( -- ) [ db-path delete-file ] ignore-errors ;
+: CLEANUP ( -- ) db-path ?delete-file ;
 
 : test.db ( -- gdbm ) <gdbm> db-path >>name ;
 
index 77ae155f4a15988c3d0178a7ec71f8fd77723c20..02f6bdbc8d994068c19cf220c9c429219263518e 100644 (file)
@@ -4,7 +4,7 @@ USING: continuations db db.tuples io.directories io.files.temp kernel
 locals sequences site-watcher.db tools.test webapps.utils ;
 IN: site-watcher.tests
 
-[ "site-watcher.db" temp-file delete-file ] ignore-errors
+"site-watcher.db" temp-file ?delete-file
 
 :: fake-sites ( -- seq )
     "site-watcher.db" <temp-sqlite-db> [
index 2dd10b82d04581f7aeb4c8e9e4de11de9c490094..9387689d7b63475949aa39cf3fa9a3c16594f456 100644 (file)
@@ -2,7 +2,7 @@ USING: accessors calendar continuations db io.directories
 io.files.temp kernel tools.test webapps.mason.backend webapps.utils ;
 IN: webapps.mason.backend.tests
 
-[ "mason-test.db" temp-file delete-file ] ignore-errors
+"mason-test.db" temp-file ?delete-file
 
 { 0 1 2 } [
     ! Do it in a with-transaction to simulate semantics of
index 484af741aad4593242c3430f63d4a78548badccd..6747141e7f892e9edaae8f1c1e9f787b72b2db4f 100644 (file)
@@ -7,7 +7,7 @@ SYMBOL: context
 
 : db-path "semantic-db-test.db" temp-file ;
 : test-db db-path sqlite-db ;
-: delete-db [ db-path delete-file ] ignore-errors ;
+: delete-db db-path ?delete-file ;
 
 delete-db
 
index b44acb7617b5bbaaeb965158992ce08a988637f0..6939131d48d98662d90143f5dd70a9f4fdbf4939 100644 (file)
@@ -3,7 +3,7 @@ IN: tangle.sandbox
 
 : db-path "tangle-sandbox.db" temp-file ;
 : sandbox-db db-path sqlite-db ;
-: delete-db [ db-path delete-file ] ignore-errors ;
+: delete-db db-path ?delete-file ;
 
 : make-sandbox ( tangle -- )
     [
index c7e9f2d79a0930eb54799b4b52af62e5aed7a047..a054fca89863dc1a13f55888438ca6cc9cabba9d 100644 (file)
@@ -3,7 +3,7 @@ IN: tangle.tests
 
 : db-path "tangle-test.db" temp-file ;
 : test-db db-path sqlite-db ;
-: delete-db [ db-path delete-file ] ignore-errors ;
+: delete-db db-path ?delete-file ;
 
 : test-tangle ( -- )
     ensure-root "foo" create-file "bar" create-file "pluck_eggs" create-file