summaryrefslogtreecommitdiff
path: root/tests/id/zero.sh
diff options
context:
space:
mode:
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