summaryrefslogtreecommitdiffstats
path: root/pw/tests/pw_usershow.sh
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2015-01-24 21:21:39 +0000
committerEnji Cooper <ngie@FreeBSD.org>2015-01-24 21:21:39 +0000
commit9497907bbe0d16a4799edb187d0c7709ff63c6fa (patch)
treef71f92f914ca8bb490ff0c9a7db9c78426deb3bd /pw/tests/pw_usershow.sh
parentb2b8eaf4b2d8e78c7ff8837fd7f9d58b4e431b1c (diff)
parent781a5b787624a2cd0208bf63bc1c0572e182a306 (diff)
downloadpw-darwin-9497907bbe0d16a4799edb187d0c7709ff63c6fa.tar.gz
pw-darwin-9497907bbe0d16a4799edb187d0c7709ff63c6fa.zip
MFhead @ r277659
Diffstat (limited to 'pw/tests/pw_usershow.sh')
-rwxr-xr-xpw/tests/pw_usershow.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/pw/tests/pw_usershow.sh b/pw/tests/pw_usershow.sh
new file mode 100755
index 0000000..4703644
--- /dev/null
+++ b/pw/tests/pw_usershow.sh
@@ -0,0 +1,19 @@
+# $FreeBSD$
+
+# Import helper functions
+. $(atf_get_srcdir)/helper_functions.shin
+
+
+# Test negative uid are still valid
+# PR: 196514
+atf_test_case show_user_with_negative_number
+show_user_with_negative_number_body() {
+ populate_etc_skel
+ atf_check -s exit:0 \
+ -o inline:"root:*:0:0::0:0:Charlie &:/root:/bin/csh\n" \
+ ${PW} usershow -n root -u -1
+}
+
+atf_init_test_cases() {
+ atf_add_test_case show_user_with_negative_number
+}