Skip to content

Commit 9aacac8

Browse files
committed
allow files to be asserted after compile
1 parent b248f3d commit 9aacac8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

bin/test

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,16 @@ detect() {
6666
capture ${BASE}/bin/detect ${BASE}/test/$1
6767
}
6868

69+
COMPILE_DIR=""
70+
6971
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)"
7179
}
7280

7381
source ${BASE}/vendor/shunit2/shunit2

0 commit comments

Comments
 (0)