summaryrefslogtreecommitdiff
path: root/tests/rm/interactive-once
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-01-23 14:42:10 +0100
committerJim Meyering <meyering@redhat.com>2012-01-23 14:42:10 +0100
commitdec02bb98ec59fc1a5a0ed6ae1dda2bda69af111 (patch)
tree84578716de23a06630790d4d1cf7221654b94275 /tests/rm/interactive-once
parent80bc8651fd6b0a41be00ab4ee82e920287b15cbc (diff)
downloadcoreutils-dec02bb98ec59fc1a5a0ed6ae1dda2bda69af111.tar.xz
tests: remove crufty test=test_name code from old tests
Before init.sh and similar, we would set test=test_name, and then construct temporary file names using $test. Now that each init.sh-using test is in its own directory, that practice is unwelcome. Remove bad examples. * tests/rm/f-1: Per above. * tests/rm/i-1: Likewise. * tests/rm/interactive-always: Likewise. * tests/rm/interactive-once: Likewise. * tests/rm/ir-1: Likewise. * tests/rm/r-1: Likewise.
Diffstat (limited to 'tests/rm/interactive-once')
-rwxr-xr-xtests/rm/interactive-once22
1 files changed, 10 insertions, 12 deletions
diff --git a/tests/rm/interactive-once b/tests/rm/interactive-once
index 5c4bd937c..982d1a4d3 100755
--- a/tests/rm/interactive-once
+++ b/tests/rm/interactive-once
@@ -16,16 +16,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-test=interactive-once
-
. "${srcdir=.}/init.sh"; path_prepend_ ../src
print_ver_ rm
mkdir -p dir1-1 dir2-1 dir2-2 || framework_failure_
touch file1-1 file2-1 file2-2 file2-3 file3-1 file3-2 file3-3 file3-4 \
|| framework_failure_
-echo y > $test.Iy || framework_failure_
-echo n > $test.In || framework_failure_
+echo y > in-y || framework_failure_
+echo n > in-n || framework_failure_
rm -f out err || framework_failure_
@@ -33,19 +31,19 @@ rm -f out err || framework_failure_
# 'echo .' is inserted after each rm to make it obvious what was asked.
echo 'one file, no recursion' > err || fail=1
-rm -I file1-* < $test.In >> out 2>> err || fail=1
+rm -I file1-* < in-n >> out 2>> err || fail=1
echo . >> err || fail=1
test -f file1-1 && fail=1
echo 'three files, no recursion' >> err || fail=1
-rm -I file2-* < $test.In >> out 2>> err || fail=1
+rm -I file2-* < in-n >> out 2>> err || fail=1
echo . >> err || fail=1
test -f file2-1 && fail=1
test -f file2-2 && fail=1
test -f file2-3 && fail=1
echo 'four files, no recursion, answer no' >> err || fail=1
-rm -I file3-* < $test.In >> out 2>> err || fail=1
+rm -I file3-* < in-n >> out 2>> err || fail=1
echo . >> err || fail=1
test -f file3-1 || fail=1
test -f file3-2 || fail=1
@@ -53,7 +51,7 @@ test -f file3-3 || fail=1
test -f file3-4 || fail=1
echo 'four files, no recursion, answer yes' >> err || fail=1
-rm -I file3-* < $test.Iy >> out 2>> err || fail=1
+rm -I file3-* < in-y >> out 2>> err || fail=1
echo . >> err || fail=1
test -f file3-1 && fail=1
test -f file3-2 && fail=1
@@ -61,23 +59,23 @@ test -f file3-3 && fail=1
test -f file3-4 && fail=1
echo 'one file, recursion, answer no' >> err || fail=1
-rm -I -R dir1-* < $test.In >> out 2>> err || fail=1
+rm -I -R dir1-* < in-n >> out 2>> err || fail=1
echo . >> err || fail=1
test -d dir1-1 || fail=1
echo 'one file, recursion, answer yes' >> err || fail=1
-rm -I -R dir1-* < $test.Iy >> out 2>> err || fail=1
+rm -I -R dir1-* < in-y >> out 2>> err || fail=1
echo . >> err || fail=1
test -d dir1-1 && fail=1
echo 'multiple files, recursion, answer no' >> err || fail=1
-rm -I -R dir2-* < $test.In >> out 2>> err || fail=1
+rm -I -R dir2-* < in-n >> out 2>> err || fail=1
echo . >> err || fail=1
test -d dir2-1 || fail=1
test -d dir2-2 || fail=1
echo 'multiple files, recursion, answer yes' >> err || fail=1
-rm -I -R dir2-* < $test.Iy >> out 2>> err || fail=1
+rm -I -R dir2-* < in-y >> out 2>> err || fail=1
echo . >> err || fail=1
test -d dir2-1 && fail=1
test -d dir2-2 && fail=1