aboutsummaryrefslogtreecommitdiff
path: root/tests/rm.test
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-03-02 15:20:04 -0600
committerRob Landley <rob@landley.net>2016-03-02 15:20:04 -0600
commit336c44adca1768ada1e1e2f4d7dbbc33e994e582 (patch)
tree9780ee9602ffbca6b04e472d3ac0d158f92ac49c /tests/rm.test
parenteb830728b12152702c3852d079ad5c8a7f6e709b (diff)
downloadtoybox-336c44adca1768ada1e1e2f4d7dbbc33e994e582.tar.gz
Factor out command name at the start of test name, have runtest.sh print it.
Diffstat (limited to 'tests/rm.test')
-rwxr-xr-xtests/rm.test12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/rm.test b/tests/rm.test
index 3fe71448..624d60fd 100755
--- a/tests/rm.test
+++ b/tests/rm.test
@@ -8,21 +8,21 @@
#testing "name" "command" "result" "infile" "stdin"
echo "abcdefghijklmnopqrstuvwxyz" > file.txt
-testing "rm text-file" "rm file.txt && [ ! -e file.txt ] && echo 'yes'" "yes\n" "" ""
+testing "text-file" "rm file.txt && [ ! -e file.txt ] && echo 'yes'" "yes\n" "" ""
rm -f file*
mkdir dir
-testing "rm empty directory" "rm -r dir && [ ! -d dir ] && echo 'yes'" "yes\n" "" ""
+testing "empty directory" "rm -r dir && [ ! -d dir ] && echo 'yes'" "yes\n" "" ""
rm -rf dir
echo "abcdefghijklmnopqrstuvwxyz" > file.txt && chmod 000 file.txt
-testing "rm text file(mode 000)" "rm -f file.txt && [ ! -e file.txt ] && echo 'yes'" \
+testing "text file(mode 000)" "rm -f file.txt && [ ! -e file.txt ] && echo 'yes'" \
"yes\n" "" ""
rm -f file*
touch file1.txt file2.txt
mkdir dir1 dir2
-testing "rm -r (multiple files and dirs)" \
+testing "-r (multiple files and dirs)" \
"rm -r file1.txt file2.txt dir1 dir2 2>/dev/null &&
[ ! -e file1.txt -a ! -e file2.txt -a ! -d dir1 -a ! -d dir2 ] && echo 'yes'" \
"yes\n" "" ""
@@ -30,7 +30,7 @@ rm -rf file* dir*
touch file1.txt file2.txt
mkdir dir1 dir2
-testing "rm -rf (present + missing files and dirs)" \
+testing "-rf (present + missing files and dirs)" \
"rm -rf file1.txt file2.txt file3.txt dir1 dir2 dir3 2>/dev/null &&
[ ! -e file1.txt -a ! -e file2.txt -a ! -d dir1 -a ! -d dir2 ] && echo 'yes'" \
"yes\n" "" ""
@@ -39,7 +39,7 @@ rm -rf file* dir*
# testing with nested dirs.
mkdir -p dir1/dir2/dir3 dir1/dir2/dir4
touch dir1/file1.txt dir1/dir2/file2.txt dir1/dir2/dir3/file3.txt
-testing "rm -r nested_dir" "rm -r dir1/dir2/ 2>/dev/null &&
+testing "-r nested_dir" "rm -r dir1/dir2/ 2>/dev/null &&
[ -d dir1 -a -f dir1/file1.txt -a ! -d dir1/dir2 ] && echo 'yes'" \
"yes\n" "" ""
rm -rf dir*