diff options
| -rw-r--r-- | tests/wallp.bats | 16 | ||||
| -rwxr-xr-x | wallp | 6 |
2 files changed, 21 insertions, 1 deletions
diff --git a/tests/wallp.bats b/tests/wallp.bats index 8a092d4..fff5c84 100644 --- a/tests/wallp.bats +++ b/tests/wallp.bats @@ -181,6 +181,22 @@ EOS grep -q "swaybg -o DP-3 -i $HOME/saved_v.png" "$HOME/calls.log" } +@test "restore runs udt-accent light, a set runs it full" { + cat > "$STUB_DIR/udt-accent" <<'EOS' +#!/bin/bash +echo "rotation=${UDT_ROTATION:-}" >> "$HOME/accent.log" +EOS + chmod +x "$STUB_DIR/udt-accent" + CONF_OUTPUT_H="DP-1"; CONF_OUTPUT_V="DP-3" + : > "$HOME/dh.png"; : > "$HOME/dv.png" + CONF_DEFAULT_H="$HOME/dh.png"; CONF_DEFAULT_V="$HOME/dv.png" + do_restore + [ "$(cat "$HOME/accent.log")" = "rotation=1" ] + : > "$HOME/accent.log" + finalize + [ "$(cat "$HOME/accent.log")" = "rotation=" ] +} + @test "restore falls back to conf defaults" { CONF_OUTPUT_H="DP-1"; CONF_OUTPUT_V="DP-3" : > "$HOME/dh.png"; : > "$HOME/dv.png" @@ -195,7 +195,11 @@ do_restore() { file="$(restore_path_for "$logical")" apply_output "$logical" "$file" || true done - finalize + # A restore puts back what the last session showed, which may be a + # wallpaper engine tick: GRUB, the homepage and SDDM were deliberately left + # on the engine's home, so the light run keeps them there. A full run here + # rebuilt both and posted their root steps on every login. + UDT_ROTATION=1 finalize } finalize() { |
