summaryrefslogtreecommitdiff
path: root/tests/chmod/octal.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/chmod/octal.sh
parentc18578632fd3c9e513e613a86ba2b7c4ebee6c45 (diff)
downloadcoreutils-upstream.tar.gz
Imported Upstream version 8.24upstream/8.24upstream
Diffstat (limited to 'tests/chmod/octal.sh')
-rwxr-xr-xtests/chmod/octal.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/chmod/octal.sh b/tests/chmod/octal.sh
index 895c8348..23d0542f 100755
--- a/tests/chmod/octal.sh
+++ b/tests/chmod/octal.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that chmod diagnoses a certain type of invalid mode string
-# Copyright (C) 2005-2014 Free Software Foundation, Inc.
+# Copyright (C) 2005-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
@@ -22,8 +22,8 @@ print_ver_ chmod
# Before coreutils-5.92, this would mistakenly succeed,
# and act like 'chmod 0 .'.
-chmod 0-followed-by-anything . 2> /dev/null && fail=1
-chmod 7-followed-by-anything . 2> /dev/null && fail=1
-chmod 8 . 2> /dev/null && fail=1
+for mode in '0-anything' '7-anything' '8'; do
+ returns_ 1 chmod "$mode" . 2>/dev/null || fail=1
+done
Exit $fail