aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/id.test8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/id.test b/tests/id.test
index b4b13a6e..5eae928e 100755
--- a/tests/id.test
+++ b/tests/id.test
@@ -5,13 +5,15 @@
#testing "name" "command" "result" "infile" "stdin"
# Systems with SELinux will have security context cruft,
-# and BSDs call the root group "wheel" instead.
-CLEAN="sed 's/ context=.*//g' | sed 's/wheel/root/g'"
+# BSDs call the root group "wheel" instead,
+# and Raspberry Pi OS has root also in the 117(lpadmin) group.
+CLEAN="sed 's/ context=.*//g' | sed 's/wheel/root/g' | \
+sed 's/117//g' | sed -E 's/\(?lpadmin\)?//g' | sed 's/[ ,]$//'"
testing "0" "id 0 | $CLEAN" "uid=0(root) gid=0(root) groups=0(root)\n" "" ""
testing "root" "id root | $CLEAN" \
"uid=0(root) gid=0(root) groups=0(root)\n" "" ""
-testing "-G root" "id -G root" "0\n" "" ""
+testing "-G root" "id -G root | $CLEAN" "0\n" "" ""
testing "-nG root" "id -nG root | $CLEAN" "root\n" "" ""
testing "-g root" "id -g root" "0\n" "" ""
testing "-ng root" "id -ng root | $CLEAN" "root\n" "" ""