aboutsummaryrefslogtreecommitdiffhomepage
path: root/system/acl_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-25 04:42:30 +0900
committerOphestra <cat@gensokyo.uk>2025-03-25 04:42:30 +0900
commitec5e91b8c97f02707a70a789ba4af84d51394ea5 (patch)
tree45f05e1315063936741ddafde8b5f95338315b54 /system/acl_test.go
parentee51320abfeafabecd42659a88af9dfd44308a3a (diff)
system: optimise string formatting
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'system/acl_test.go')
-rw-r--r--system/acl_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/system/acl_test.go b/system/acl_test.go
index ed154ad1..22a33c65 100644
--- a/system/acl_test.go
+++ b/system/acl_test.go
@@ -46,20 +46,20 @@ func TestUpdatePermType(t *testing.T) {
}
}
-func TestACL_String(t *testing.T) {
+func TestACLString(t *testing.T) {
testCases := []struct {
want string
et Enablement
perms []acl.Perm
}{
- {`--- type: Process path: "/nonexistent"`, Process, []acl.Perm{}},
- {`r-- type: User path: "/nonexistent"`, User, []acl.Perm{acl.Read}},
- {`-w- type: Wayland path: "/nonexistent"`, EWayland, []acl.Perm{acl.Write}},
- {`--x type: X11 path: "/nonexistent"`, EX11, []acl.Perm{acl.Execute}},
- {`rw- type: D-Bus path: "/nonexistent"`, EDBus, []acl.Perm{acl.Read, acl.Write}},
- {`r-x type: PulseAudio path: "/nonexistent"`, EPulse, []acl.Perm{acl.Read, acl.Execute}},
- {`rwx type: User path: "/nonexistent"`, User, []acl.Perm{acl.Read, acl.Write, acl.Execute}},
- {`rwx type: Process path: "/nonexistent"`, Process, []acl.Perm{acl.Read, acl.Write, acl.Write, acl.Execute}},
+ {`--- type: process path: "/nonexistent"`, Process, []acl.Perm{}},
+ {`r-- type: user path: "/nonexistent"`, User, []acl.Perm{acl.Read}},
+ {`-w- type: wayland path: "/nonexistent"`, EWayland, []acl.Perm{acl.Write}},
+ {`--x type: x11 path: "/nonexistent"`, EX11, []acl.Perm{acl.Execute}},
+ {`rw- type: dbus path: "/nonexistent"`, EDBus, []acl.Perm{acl.Read, acl.Write}},
+ {`r-x type: pulseaudio path: "/nonexistent"`, EPulse, []acl.Perm{acl.Read, acl.Execute}},
+ {`rwx type: user path: "/nonexistent"`, User, []acl.Perm{acl.Read, acl.Write, acl.Execute}},
+ {`rwx type: process path: "/nonexistent"`, Process, []acl.Perm{acl.Read, acl.Write, acl.Write, acl.Execute}},
}
for _, tc := range testCases {