summaryrefslogtreecommitdiff
path: root/tests/id/zero.sh
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:13:50 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:13:50 +0300
commit71cd8e3a743046573744123777061b64881bf372 (patch)
tree82522befe647f4fff186a5630cad0cad33f8ef53 /tests/id/zero.sh
parentc18578632fd3c9e513e613a86ba2b7c4ebee6c45 (diff)
downloadcoreutils-upstream.tar.gz
Imported Upstream version 8.24upstream/8.24upstream
Diffstat (limited to 'tests/id/zero.sh')
-rwxr-xr-xtests/id/zero.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/id/zero.sh b/tests/id/zero.sh
index c826ff43..7bee3a64 100755
--- a/tests/id/zero.sh
+++ b/tests/id/zero.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Exercise "id --zero".
-# Copyright (C) 2013-2014 Free Software Foundation, Inc.
+# Copyright (C) 2013-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -51,8 +51,10 @@ while read u ; do
printf '\n%s: ' "id -${o}${n}[z] $u" >> out || framework_failure_
# There may be no name corresponding to an id, so don't check
# exit status when in name lookup mode
- id -${o}${n} $u >> exp || { test -z "$n" && fail=1; }
- id -${o}${n}z $u > tmp || { test -z "$n" && fail=1; }
+ id -${o}${n} $u >> exp ||
+ { test $? -ne 1 || test -z "$n" && fail=1; }
+ id -${o}${n}z $u > tmp ||
+ { test $? -ne 1 || test -z "$n" && fail=1; }
head -c-1 < tmp >> out || framework_failure_
done
done