aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/id.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/id.test b/tests/id.test
new file mode 100755
index 00000000..6d0f63a8
--- /dev/null
+++ b/tests/id.test
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+[ -f testing.sh ] && . testing.sh
+
+#testing "name" "command" "result" "infile" "stdin"
+
+testing "id 0" "id 0" "uid=0(root) gid=0(root) groups=0(root)\n" "" ""
+testing "id root" "id root" "uid=0(root) gid=0(root) groups=0(root)\n" "" ""
+testing "id no-such-user" "id no-such-user 2>/dev/null ; echo \$?" "1\n" "" ""
+testing "id 9999999" "id 9999999 2>/dev/null ; echo \$?" "1\n" "" ""