fix with-directory and write unit test

db4
Doug Coleman 2008-02-28 16:37:04 -06:00
parent b71d7bc422
commit 2f7247334e
2 changed files with 4 additions and 2 deletions

View File

@ -121,3 +121,5 @@ USING: tools.test io.files io threads kernel continuations ;
[ ] [ "copy-destination" temp-file delete-tree ] unit-test [ ] [ "copy-destination" temp-file delete-tree ] unit-test
[ ] [ "copy-tree-test" temp-file delete-tree ] unit-test [ ] [ "copy-tree-test" temp-file delete-tree ] unit-test
[ t ] [ cwd "core" resource-path [ ] with-directory cwd = ] unit-test

View File

@ -70,7 +70,7 @@ HOOK: cd io-backend ( path -- )
HOOK: cwd io-backend ( -- path ) HOOK: cwd io-backend ( -- path )
: with-directory ( path quot -- ) : with-directory ( path quot -- )
swap cd cwd [ cd ] curry [ ] cleanup ; inline cwd [ cd ] curry rot cd [ ] cleanup ; inline
! Creating directories ! Creating directories
HOOK: make-directory io-backend ( path -- ) HOOK: make-directory io-backend ( path -- )