try-process ;
: run-test ( -- line )
- os windows? "temp/a.exe" "temp/a.out" ?
+ os windows? "a.exe" "a.out" ?
ascii [ readln ] with-process-reader ;
:: test-embedding ( code -- line )
}
]I
] with-string-writer
- "resource:temp" [ compile-file ] with-directory
- "resource:" [ run-test ] with-directory ;
+ [ compile-file ] with-temp-directory
+ [ run-test ] with-temp-directory ;
! [ "Done." ] [ "" test-embedding ] unit-test
-! [ "Done." ] [ "factor_yield();" test-embedding ] unit-test
\ No newline at end of file
+! [ "Done." ] [ "factor_yield();" test-embedding ] unit-test