]> gitweb.factorcode.org Git - factor.git/commitdiff
io.pathnames: don't use temp-file
authorDoug Coleman <doug.coleman@gmail.com>
Wed, 30 Mar 2016 23:47:32 +0000 (16:47 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 31 Mar 2016 00:31:32 +0000 (17:31 -0700)
core/io/pathnames/pathnames-tests.factor

index 8ea5c251b4050133a7e6a99f68917b761dc4ff11..0cf298b8a0f3185a745ae08e1e91bbdafee0bc2f 100644 (file)
@@ -1,7 +1,6 @@
-USING: continuations hashtables io.backend io.directories
-io.files.private io.files.temp io.pathnames kernel math
-namespaces system tools.test ;
-IN: io.pathnames.tests
+USING: io.backend io.directories io.files.private io.files.temp
+io.files.unique io.pathnames kernel locals math namespaces
+system tools.test ;
 
 { "passwd" } [ "/etc/passwd" file-name ] unit-test
 { "awk" } [ "/usr/libexec/awk/" file-name ] unit-test
@@ -53,8 +52,11 @@ IN: io.pathnames.tests
 { t } [ "resource:core" absolute-path? ] unit-test
 { f } [ "" absolute-path? ] unit-test
 
-[ "touch-twice-test" temp-file delete-file ] ignore-errors
-{ } [ 2 [ "touch-twice-test" temp-file touch-file ] times ] unit-test
+[
+    "touch-twice-test" ".txt" [| path |
+        { } [ 2 [ path touch-file ] times ] unit-test
+    ] cleanup-unique-file
+] with-temp-directory
 
 ! aum's bug
 H{