summaryrefslogtreecommitdiff
path: root/tests/mv
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-05-11 03:35:01 +0000
committerJim Meyering <jim@meyering.net>1998-05-11 03:35:01 +0000
commit4e1e8c600d7557e3aaacb582ec7068f34c34a5a0 (patch)
treec13686b0a2c96b97b6a6b730dda08d13dfd9a141 /tests/mv
parentd816bb4f14b3186451105f1afd311e1938d1d74e (diff)
downloadcoreutils-4e1e8c600d7557e3aaacb582ec7068f34c34a5a0.tar.xz
add --verbose and compare against expected output
Diffstat (limited to 'tests/mv')
-rwxr-xr-xtests/mv/mv-special-146
1 files changed, 44 insertions, 2 deletions
diff --git a/tests/mv/mv-special-1 b/tests/mv/mv-special-1
index 0a86a1d81..8c3f96e3c 100755
--- a/tests/mv/mv-special-1
+++ b/tests/mv/mv-special-1
@@ -28,8 +28,16 @@ if test $framework_failure = 1; then
exit 1
fi
+# Make sure we get English translations.
+LANGUAGE=C
+export LANGUAGE
+LC_ALL=C
+export LC_ALL
+LANG=C
+export LANG
+
fail=0
-$MV $null $dir $other_partition_tmpdir || fail=1
+$MV --verbose $null $dir $other_partition_tmpdir > out || fail=1
# Make sure the files are gone.
test -f $null && fail=1
test -d $dir && fail=1
@@ -38,9 +46,43 @@ test -d $dir && fail=1
$LS $other_partition_tmpdir/$null > /dev/null || fail=1
test -d $other_partition_tmpdir/$dir/a/b/c || fail=1
+sed "s,$other_partition_tmpdir,XXX," out > out2
+
+cat > exp <<\EOF
+.mv-null -> XXX/.mv-null
+removing non-directory .mv-null
+.mv-dir -> XXX/.mv-dir
+.mv-dir/a -> XXX/.mv-dir/a
+.mv-dir/a/b -> XXX/.mv-dir/a/b
+.mv-dir/a/b/c -> XXX/.mv-dir/a/b/c
+.mv-dir/a/b/c/file1 -> XXX/.mv-dir/a/b/c/file1
+.mv-dir/d -> XXX/.mv-dir/d
+.mv-dir/d/e -> XXX/.mv-dir/d/e
+.mv-dir/d/e/f -> XXX/.mv-dir/d/e/f
+.mv-dir/d/e/f/file2 -> XXX/.mv-dir/d/e/f/file2
+removing all entries of directory .mv-dir
+removing all entries of directory .mv-dir/a
+removing all entries of directory .mv-dir/a/b
+removing all entries of directory .mv-dir/a/b/c
+removing non-directory .mv-dir/a/b/c/file1
+removing the directory itself: .mv-dir/a/b/c
+removing the directory itself: .mv-dir/a/b
+removing the directory itself: .mv-dir/a
+removing all entries of directory .mv-dir/d
+removing all entries of directory .mv-dir/d/e
+removing all entries of directory .mv-dir/d/e/f
+removing non-directory .mv-dir/d/e/f/file2
+removing the directory itself: .mv-dir/d/e/f
+removing the directory itself: .mv-dir/d/e
+removing the directory itself: .mv-dir/d
+removing the directory itself: .mv-dir
+EOF
+
+cmp out2 exp || fail=1
+
# cd $other_partition_tmpdir
# $LS -l -A -R $other_partition_tmpdir
-$RM -rf $null $dir $other_partition_tmpdir
+$RM -rf $null $dir $other_partition_tmpdir out out2 exp
exit $fail