Skip to content
Browse files

allow files to be asserted after compile

  • Loading branch information...
1 parent b248f3d commit 9aacac8087b723dc5447fd96d8166131dff1037f @ddollar ddollar committed Jul 15, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 bin/test
View
10 bin/test
@@ -66,8 +66,16 @@ detect() {
capture ${BASE}/bin/detect ${BASE}/test/$1
}
+COMPILE_DIR=""
+
compile() {
- capture ${BASE}/bin/compile ${BASE}/test/$1 $2
+ COMPILE_DIR=$(mktmpdir)
+ cp -r ${BASE}/test/$1/* ${COMPILE_DIR}/
+ capture ${BASE}/bin/compile ${COMPILE_DIR} $2
+}
+
+assertFile() {
+ assertEquals "$1" "$(cat ${COMPILE_DIR}/$2)"
}
source ${BASE}/vendor/shunit2/shunit2

0 comments on commit 9aacac8

Please sign in to comment.
Something went wrong with that request. Please try again.