summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/run-tests.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/run-tests.sh b/test/run-tests.sh
index 0e655d0..1c75cd7 100755
--- a/test/run-tests.sh
+++ b/test/run-tests.sh
@@ -219,6 +219,17 @@ fi
out=$("$BIN/gradle-report" "$tmproot/nope" detekt 2>&1); rc=$?
if [ $rc -eq 2 ]; then ok "missing project dir is fatal"; else bad "missing dir" "rc=$rc"; fi
+# A missing report must fail, not fall through to the exit code. A hardcoded path that stops
+# resolving would otherwise report PASS forever while inspecting nothing.
+d="$tmproot/report-noreport"
+make_project "$d" 0
+out=$("$BIN/gradle-report" "$d" detekt 2>&1); rc=$?
+if [ $rc -ne 0 ] && printf '%s' "$out" | grep -qi "did NOT inspect"; then
+ ok "a missing report fails instead of passing on exit code"
+else
+ bad "missing report" "rc=$rc out=$out"
+fi
+
printf '=== android-ui ===\n'
# 16. Usage validation without a device.