aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/status/test-statusctl.sh
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules/status/test-statusctl.sh')
-rwxr-xr-xdesktop/modules/status/test-statusctl.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop/modules/status/test-statusctl.sh b/desktop/modules/status/test-statusctl.sh
index 3b8f7ba..82e2de1 100755
--- a/desktop/modules/status/test-statusctl.sh
+++ b/desktop/modules/status/test-statusctl.sh
@@ -73,7 +73,9 @@ kill "$watcher" 2>/dev/null
wait "$watcher" 2>/dev/null
check "watch reports activated" "1" "$(grep -c '"class": *"activated"' "$out")"
-# A missing file is reported as down, distinct from a mode that is off.
+# A missing file is the off state, so the absent-file watch reports off rather
+# than a distinct warning: a fresh session has no file until something writes
+# one, and that is the normal state.
rm -f "$tmp/status.presentation"
out2="$tmp/watch2.out"
"$ctl" presentation watch > "$out2" 2>/dev/null &
@@ -81,7 +83,7 @@ watcher2=$!
sleep 0.5
kill "$watcher2" 2>/dev/null
wait "$watcher2" 2>/dev/null
-check "watch reports down when absent" "1" "$(grep -c '"class": *"down"' "$out2")"
+check "watch reports deactivated when absent" "1" "$(grep -c '"class": *"deactivated"' "$out2")"
printf '\n%d passed, %d failed\n' "$pass" "$fail"
[[ "$fail" -eq 0 ]]