From 6580a55aeb5b5f8c1f312cfcc74edafc1ae876ed Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 7 Jan 2003 15:34:34 +0000 Subject: Remove the test for non-owner diagnostic. Now, this tests only the nonexistent-directory diagnostic. --- tests/touch/fail-diag | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'tests/touch/fail-diag') diff --git a/tests/touch/fail-diag b/tests/touch/fail-diag index b7abd195a..f050f5798 100755 --- a/tests/touch/fail-diag +++ b/tests/touch/fail-diag @@ -19,7 +19,7 @@ framework_failure=0 mkdir $tmp || framework_failure=1 cd $tmp || framework_failure=1 -d1=/no-$$ +d1=no-$$ dir=/$d1/such-dir # Ensure that $d1 doesn't already exist. ls -d $d1 2> /dev/null && framework_failure=1 @@ -31,25 +31,12 @@ fi fail=0 -# Before fileutils-4.1, we'd get the following misleading -# diagnostic instead of `Permission denied'. -# touch: creating `/': Is a directory -touch / > out 2>&1 && fail=1 - -touch $dir >> out 2>&1 && fail=1 - -# On SunOS4, EPERM is `Not owner'. -# On some *BSD systems it's `Operation not permitted'. -for msg in 'Not owner' 'Operation not permitted' 'Permission denied'; do - cat > exp < out 2>&1 && fail=1 +cat < exp +touch: cannot touch \`$dir': No such file or directory EOF - cmp out exp > /dev/null 2>&1 && break - -done - +cmp out exp || fail=1 test $fail = 1 && diff out exp 2> /dev/null (exit $fail); exit -- cgit v1.2.3-54-g00ecf