diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-09-08 04:17:39 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-09-08 04:17:39 +0900 |
| commit | 985c4dd2fc175d8c52304ee387a71e7d855b421a (patch) | |
| tree | 8f487bf3786bbe53a6302bbd9e84dc5ad342b073 /system/dispatcher_test.go | |
| parent | da2b9c01ceac2d55c271de46d7d18e5b3f19b89b (diff) | |
system/xhost: wrap revert error correctly
This otherwise creates a confusing error message on a revert failure.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'system/dispatcher_test.go')
| -rw-r--r-- | system/dispatcher_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/system/dispatcher_test.go b/system/dispatcher_test.go index f798047c..7bd4e6db 100644 --- a/system/dispatcher_test.go +++ b/system/dispatcher_test.go @@ -13,6 +13,7 @@ import ( "hakurei.app/container/stub" "hakurei.app/system/acl" "hakurei.app/system/dbus" + "hakurei.app/system/internal/xcb" ) // call initialises a [stub.Call]. @@ -280,6 +281,14 @@ func (k *kstub) aclUpdate(name string, uid int, perms ...acl.Perm) error { stub.CheckArgReflect(k.Stub, "perms", perms, 2)) } +func (k *kstub) xcbChangeHosts(mode xcb.HostMode, family xcb.Family, address string) error { + k.Helper() + return k.Expects("xcbChangeHosts").Error( + stub.CheckArg(k.Stub, "mode", mode, 0), + stub.CheckArg(k.Stub, "family", family, 1), + stub.CheckArg(k.Stub, "address", address, 2)) +} + func (k *kstub) dbusAddress() (session, system string) { k.Helper() ret := k.Expects("dbusAddress").Ret.([2]string) |
