Commit 85170d5f authored by David Dollar's avatar David Dollar

test that nothing is cached

parent 9681b4fc
...@@ -33,6 +33,13 @@ testPackageJsonWithoutVersion() { ...@@ -33,6 +33,13 @@ testPackageJsonWithoutVersion() {
assertCapturedSuccess assertCapturedSuccess
} }
testNothingCached() {
cache=$(mktmpdir)
compile "package-json-version" $cache
assertCapturedSuccess
assertEquals "0" "$(ls -1 $cache | wc -l)"
}
## utils ######################################## ## utils ########################################
pushd $(dirname 0) >/dev/null pushd $(dirname 0) >/dev/null
...@@ -41,12 +48,19 @@ popd >/dev/null ...@@ -41,12 +48,19 @@ popd >/dev/null
source ${BASE}/vendor/test-utils/test-utils source ${BASE}/vendor/test-utils/test-utils
mktmpdir() {
dir=$(mktemp -t testXXXXX)
rm -rf $dir
mkdir $dir
echo $dir
}
detect() { detect() {
capture ${BASE}/bin/detect ${BASE}/test/$1 capture ${BASE}/bin/detect ${BASE}/test/$1
} }
compile() { compile() {
capture ${BASE}/bin/compile ${BASE}/test/$1 capture ${BASE}/bin/compile ${BASE}/test/$1 $2
} }
source ${BASE}/vendor/shunit2/shunit2 source ${BASE}/vendor/shunit2/shunit2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment