use ?delete-file instead of [ delete-file ] ignore-errors.

char-rename
John Benediktsson 2016-07-10 20:28:46 -07:00
parent bd630d1464
commit 6b12e2e3bc
14 changed files with 17 additions and 16 deletions

View 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 [
[ ] [

View 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

View 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 [

View 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> [

View 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> [

View 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

View 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
{ } [

View 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

View 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 ;

View 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> [

View 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

View 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

View 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 -- )
[

View 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