Skip to content
This repository
Browse code

allow files to be asserted after compile

  • Loading branch information...
commit 9aacac8087b723dc5447fd96d8166131dff1037f 1 parent b248f3d
David Dollar authored July 15, 2012

Showing 1 changed file with 9 additions and 1 deletion. Show diff stats Hide diff stats

  1. 10  bin/test
10  bin/test
@@ -66,8 +66,16 @@ detect() {
66 66
   capture ${BASE}/bin/detect ${BASE}/test/$1
67 67
 }
68 68
 
  69
+COMPILE_DIR=""
  70
+
69 71
 compile() {
70  
-  capture ${BASE}/bin/compile ${BASE}/test/$1 $2
  72
+  COMPILE_DIR=$(mktmpdir)
  73
+  cp -r ${BASE}/test/$1/* ${COMPILE_DIR}/
  74
+  capture ${BASE}/bin/compile ${COMPILE_DIR} $2
  75
+}
  76
+
  77
+assertFile() {
  78
+  assertEquals "$1" "$(cat ${COMPILE_DIR}/$2)"
71 79
 }
72 80
 
73 81
 source ${BASE}/vendor/shunit2/shunit2

0 notes on commit 9aacac8

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