Skip to content

Commit

Permalink
allow files to be asserted after compile
Browse files Browse the repository at this point in the history
  • Loading branch information
ddollar committed Jul 15, 2012
1 parent b248f3d commit 9aacac8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -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.