summaryrefslogtreecommitdiff
path: root/usr/src/test
diff options
context:
space:
mode:
authorPatrick Mooney <pmooney@pfmooney.com>2017-07-05 18:18:21 +0000
committerPatrick Mooney <pmooney@pfmooney.com>2017-07-05 18:18:21 +0000
commite207f19539a82d54279d458fc3c449d519207e2b (patch)
tree1171f739548341542148eb768cbd830def090ee1 /usr/src/test
parent75647a92265dde475f2caca5f9d959ecf9f8b633 (diff)
parent28e2b3ad0b14867ee7f3383890f6658e6e9448a1 (diff)
downloadillumos-joyent-release-20170706.tar.gz
[illumos-gate merge]release-20170706
commit 28e2b3ad0b14867ee7f3383890f6658e6e9448a1 5167 git-pbchk fails to detect parent branch commit 04427e3bf236c18cc532680b957267ee70b1037d 4703 would like xargs support for -P commit 87bdc12930bfa66277c45510e399f8a01e06c376 8425 boot: create_ramdisk needs cleanup
Diffstat (limited to 'usr/src/test')
-rw-r--r--usr/src/test/util-tests/tests/xargs/xargs_test.ksh37
1 files changed, 37 insertions, 0 deletions
diff --git a/usr/src/test/util-tests/tests/xargs/xargs_test.ksh b/usr/src/test/util-tests/tests/xargs/xargs_test.ksh
index 2d6f76ce10..6e217c45e0 100644
--- a/usr/src/test/util-tests/tests/xargs/xargs_test.ksh
+++ b/usr/src/test/util-tests/tests/xargs/xargs_test.ksh
@@ -13,6 +13,7 @@
#
# Copyright 2014 Garrett D'Amore <garrett@damore.org>
+# Copyright (c) 2017, Joyent, Inc.
#
XARGS=${XARGS:=/usr/bin/xargs}
@@ -242,6 +243,39 @@ test18() {
test_pass $t
}
+test19() {
+ t=test19
+ test_start $t "bad -P option (negative value)"
+ $XARGS -P -3 </dev/null 2>/dev/null
+ if [[ $? -eq 2 ]]; then
+ test_pass $t
+ else
+ test_fail $t
+ fi
+}
+
+test20() {
+ t=test20
+ test_start $t "bad -P option (bad string)"
+ $XARGS -P as3f </dev/null 2>/dev/null
+ if [[ $? -eq 2 ]]; then
+ test_pass $t
+ else
+ test_fail $t
+ fi
+}
+
+test21() {
+ t=test21
+ test_start $t "bad -P option (extraneous characters)"
+ $XARGS -P 2c </dev/null 2>/dev/null
+ if [[ $? -eq 2 ]]; then
+ test_pass $t
+ else
+ test_fail $t
+ fi
+}
+
test1
test2
test3
@@ -260,3 +294,6 @@ test15
test16
test17
test18
+test19
+test20
+test21