summaryrefslogtreecommitdiff
path: root/tests/rm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rm')
-rw-r--r--tests/rm/Makefile.am5
-rwxr-xr-xtests/rm/unreadable10
2 files changed, 9 insertions, 6 deletions
diff --git a/tests/rm/Makefile.am b/tests/rm/Makefile.am
index 203fe36a6..f29274744 100644
--- a/tests/rm/Makefile.am
+++ b/tests/rm/Makefile.am
@@ -33,12 +33,15 @@ TESTS = \
unread3 \
no-give-up \
dir-no-w \
+ empty-name \
fail-2eperm \
cycle i-no-r fail-eperm \
rm1 rm2 rm3 rm4 rm5 \
unread2 r-1 r-2 r-3 r-4 i-1 ir-1 f-1 sunos-1 \
+ unreadable \
interactive-always interactive-once \
- isatty # unreadable empty-name
+ isatty
+
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
RM=../../src/rm \
diff --git a/tests/rm/unreadable b/tests/rm/unreadable
index c5b9c9877..66a59515c 100755
--- a/tests/rm/unreadable
+++ b/tests/rm/unreadable
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "rm" and unreadable directories.
-# Copyright (C) 1998, 2003, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2003, 2005-2007 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
@@ -43,12 +43,12 @@ my @Tests =
(
# test-name options input expected-output
#
- ['unreadable-1', '-rf', $d,
- {EXIT => 1}, {ERR => "$prog: $d/.: Permission denied\n"}, $mkdir],
+ # Removing an empty, unwritable directory succeeds.
+ ['unreadable-1', '-rf', $d, {EXIT => 0}, $mkdir],
+
['unreadable-2', '-rf', $d,
{EXIT => 1},
- {ERR => "$prog: $d/.: Permission denied\n" .
- "$prog: cannot remove directory `$d': File exists\n"},
+ {ERR => "$prog: cannot remove \`$d': Permission denied\n"},
{PRE => sub { (mkdir $d,0700 and mkdir "$d/x",0700 and chmod 0100,$d)
or die "$d: $!\n"}} ],
);