Skip to content

Commit

Permalink
By default, don't replay events when in interactive mode in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
serenity4 committed Aug 27, 2024
1 parent 14843b5 commit 32cb0b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ end
rectangle = Ref(XCB.xcb_rectangle_t(20, 20, 60, 60))
interactive = ENV["DISPLAY"] ":99"

function test()
function test(; replay_events = !interactive)
wm = XWindowManager()
screen = current_screen(wm)
win = XCBWindow(wm; screen, x=0, y=1000, border_width=50, window_title="XCB window", icon_title="XCB", attributes=[XCB.XCB_CW_BACK_PIXEL], values=[screen.black_pixel])
Expand Down Expand Up @@ -101,6 +101,7 @@ function test()

events = save_history(wm, queue)

replay_events || return
@info "Replaying events..."
wm = XWindowManager()
screen = current_screen(wm)
Expand Down

0 comments on commit 32cb0b5

Please sign in to comment.