diff options
Diffstat (limited to 'desktop/modules/status/test-statusctl.sh')
| -rwxr-xr-x | desktop/modules/status/test-statusctl.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/desktop/modules/status/test-statusctl.sh b/desktop/modules/status/test-statusctl.sh index 8042fd1..0c51968 100755 --- a/desktop/modules/status/test-statusctl.sh +++ b/desktop/modules/status/test-statusctl.sh @@ -149,6 +149,23 @@ kill "$watcher5" 2>/dev/null wait "$watcher5" 2>/dev/null check "first write, created by link, redraws" "1" "$(grep -c '"class": *"gaming"' "$out5")" +# deck-it writes status.xbox while the Xbox runs a game; it holds +# presentation on the same way, so the watch follows it too. +rm -f "$tmp/status.gaming" "$tmp/status.presentation" +out6="$tmp/watch6.out" +"$ctl" presentation watch > "$out6" 2>/dev/null & +watcher6=$! +sleep 0.3 +printf '1\n' > "$tmp/status.xbox.tmp" +mv -f "$tmp/status.xbox.tmp" "$tmp/status.xbox" +sleep 0.5 +kill "$watcher6" 2>/dev/null +wait "$watcher6" 2>/dev/null +check "xbox game redraws as gaming" "1" "$(grep -c '"class": *"gaming"' "$out6")" +"$ctl" presentation toggle 2>/dev/null +check "toggle refused while the xbox plays" "1" "$?" +rm -f "$tmp/status.xbox" + # quiet is a plain mode like dnd. "$ctl" quiet set 1 check "quiet set 1" "1" "$("$ctl" quiet get)" |
