summaryrefslogtreecommitdiff
path: root/tests/chmod
diff options
context:
space:
mode:
Diffstat (limited to 'tests/chmod')
-rwxr-xr-xtests/chmod/c-option.sh2
-rwxr-xr-xtests/chmod/equal-x.sh2
-rwxr-xr-xtests/chmod/equals.sh2
-rwxr-xr-xtests/chmod/inaccessible.sh2
-rwxr-xr-xtests/chmod/no-x.sh2
-rwxr-xr-xtests/chmod/octal.sh8
-rwxr-xr-xtests/chmod/setgid.sh2
-rwxr-xr-xtests/chmod/silent.sh2
-rwxr-xr-xtests/chmod/thru-dangling.sh2
-rwxr-xr-xtests/chmod/umask-x.sh4
-rwxr-xr-xtests/chmod/usage.sh6
11 files changed, 17 insertions, 17 deletions
diff --git a/tests/chmod/c-option.sh b/tests/chmod/c-option.sh
index 03e1db9a..bba557af 100755
--- a/tests/chmod/c-option.sh
+++ b/tests/chmod/c-option.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that chmod's --changes (-c) option works.
-# Copyright (C) 2000-2014 Free Software Foundation, Inc.
+# Copyright (C) 2000-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
diff --git a/tests/chmod/equal-x.sh b/tests/chmod/equal-x.sh
index 75a2fa1a..98f6bc49 100755
--- a/tests/chmod/equal-x.sh
+++ b/tests/chmod/equal-x.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "chmod =x" and the like.
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-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
diff --git a/tests/chmod/equals.sh b/tests/chmod/equals.sh
index 4daba4be..b7f4362e 100755
--- a/tests/chmod/equals.sh
+++ b/tests/chmod/equals.sh
@@ -3,7 +3,7 @@
# Before fileutils-4.1.2, some of them didn't.
# Also, before coreutils-5.3.1, =[ugo] sometimes didn't work.
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-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
diff --git a/tests/chmod/inaccessible.sh b/tests/chmod/inaccessible.sh
index 2ef2a61f..e57cf92a 100755
--- a/tests/chmod/inaccessible.sh
+++ b/tests/chmod/inaccessible.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test for the bug fixed on 2006-09-20.
-# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+# Copyright (C) 2006-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
diff --git a/tests/chmod/no-x.sh b/tests/chmod/no-x.sh
index 64e81ed8..d43c4a25 100755
--- a/tests/chmod/no-x.sh
+++ b/tests/chmod/no-x.sh
@@ -2,7 +2,7 @@
# Make sure chmod gives the right diagnostic for a readable,
# but inaccessible directory.
-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+# Copyright (C) 2003-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
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
diff --git a/tests/chmod/setgid.sh b/tests/chmod/setgid.sh
index 0c0722de..1e82e882 100755
--- a/tests/chmod/setgid.sh
+++ b/tests/chmod/setgid.sh
@@ -3,7 +3,7 @@
# on directories with the setgid bit set. Also, check that the GNU octal
# notations work.
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-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
diff --git a/tests/chmod/silent.sh b/tests/chmod/silent.sh
index 5d5dcb58..d0d2b158 100755
--- a/tests/chmod/silent.sh
+++ b/tests/chmod/silent.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that chgrp, chmod, chown -f don't print some diagnostics
-# Copyright (C) 2008-2014 Free Software Foundation, Inc.
+# Copyright (C) 2008-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
diff --git a/tests/chmod/thru-dangling.sh b/tests/chmod/thru-dangling.sh
index 4a137e81..5cd0ad96 100755
--- a/tests/chmod/thru-dangling.sh
+++ b/tests/chmod/thru-dangling.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test for proper error and exit code of chmod on a dangling symlink.
-# Copyright (C) 2007-2014 Free Software Foundation, Inc.
+# Copyright (C) 2007-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
diff --git a/tests/chmod/umask-x.sh b/tests/chmod/umask-x.sh
index 9e0e0012..f31452a3 100755
--- a/tests/chmod/umask-x.sh
+++ b/tests/chmod/umask-x.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test that chmod -x file reports an error if the result is executable.
-# 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
@@ -21,6 +21,6 @@ print_ver_ chmod
touch file
chmod 755 file
-(umask 77 && chmod -x file) 2>/dev/null && fail=1
+(umask 77 && returns_ 1 chmod -x file) 2>/dev/null || fail=1
Exit $fail
diff --git a/tests/chmod/usage.sh b/tests/chmod/usage.sh
index 7e27e7ce..ac6d635a 100755
--- a/tests/chmod/usage.sh
+++ b/tests/chmod/usage.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that chmod works correctly with odd option combinations.
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# Copyright (C) 2004-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
@@ -67,7 +67,7 @@ for case in $cases; do
case $files in
'')
touch -- $all_files || framework_failure_
- chmod $args 2>/dev/null && fail=1
+ returns_ 1 chmod $args 2>/dev/null || fail=1
;;
?*)
touch -- $files || framework_failure_
@@ -77,7 +77,7 @@ for case in $cases; do
# chmod has a bug if it succeeds even though $file is absent.
rm -f -- $all_files && touch -- $files && rm -- $file \
|| framework_failure_
- chmod $args 2>/dev/null && fail=1
+ returns_ 1 chmod $args 2>/dev/null || fail=1
done
;;
esac