repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

hypr/tests/hypr_osd_test.lua

Raw
File outline
package.path = "./?.lua;./?/init.lua;" .. package.path

local osd = require("modules.hypr_osd")

local function assert_contains(haystack, needle)
  assert(haystack:find(needle, 1, true), haystack .. " does not contain " .. needle)
end

assert_contains(osd.session.reload, "hyprctl reload")
assert_contains(osd.session.reload, "hyprctl notify 5")
assert_contains(osd.capture.region("hyprshot -m region -z"), "Region captured")
assert_contains(osd.controls.volume_up, "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+")
assert_contains(osd.controls.volume_up, "Volume")
assert_contains(osd.notifications.clear_all, "makoctl dismiss --all")
assert_contains(osd.notifications.clear_all, "hyprctl dismissnotify")

print("hypr_osd ok")