summaryrefslogtreecommitdiff
path: root/tests/rm
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-11-01 18:53:26 +0000
committerPádraig Brady <P@draigBrady.com>2015-11-04 23:30:14 +0000
commit08e8fd7e38f2dae7c69c54eb22d508b6517e66e5 (patch)
tree63d021e305cd93bea445f9484fe8b3446dda2c3d /tests/rm
parent1e8f9afac53a628dbc64e62bea53eb2da29c47fa (diff)
downloadcoreutils-08e8fd7e38f2dae7c69c54eb22d508b6517e66e5.tar.xz
all: avoid quoting file names when possible
Quote file names using the "shell-escape" or "shell-escape-always" methods, which quote as appropriate for most shells, and better support copy and paste of presented names. The "always" variant is used when the file name is embedded in an error message with surrounding spaces. * cfg.mk (sc_error_shell_quotes): A new syntax check rule to suggest quotef() where appropriate. (sc_error_shell_always_quotes): Likewise for quoteaf(). * src/system.h (quotef): A new define to apply shell quoting when needed. I.E. when shell character or ':' is present. (quoteaf): Likewise, but always quote. * src/*.c: Use quotef() and quoteaf() rather than quote() where appropriate. * tests/: Adjust accordingly.
Diffstat (limited to 'tests/rm')
-rwxr-xr-xtests/rm/d-1.sh2
-rwxr-xr-xtests/rm/d-3.sh2
-rwxr-xr-xtests/rm/r-1.sh4
-rwxr-xr-xtests/rm/r-2.sh4
-rwxr-xr-xtests/rm/v-slash.sh2
5 files changed, 7 insertions, 7 deletions
diff --git a/tests/rm/d-1.sh b/tests/rm/d-1.sh
index 43b753ebc..bde8c695c 100755
--- a/tests/rm/d-1.sh
+++ b/tests/rm/d-1.sh
@@ -25,7 +25,7 @@ mkdir a || framework_failure_
rm --verbose --dir a b > out || fail=1
cat <<\EOF > exp || framework_failure_
-removed directory: 'a'
+removed directory 'a'
removed 'b'
EOF
diff --git a/tests/rm/d-3.sh b/tests/rm/d-3.sh
index af39da38b..1200ca459 100755
--- a/tests/rm/d-3.sh
+++ b/tests/rm/d-3.sh
@@ -28,7 +28,7 @@ printf "%s" \
> exp.err || framework_failure_
printf "%s\n" \
- "removed directory: 'd'" \
+ "removed directory 'd'" \
> exp || framework_failure_
compare exp out || fail=1
diff --git a/tests/rm/r-1.sh b/tests/rm/r-1.sh
index 21564c6a5..2a14110a3 100755
--- a/tests/rm/r-1.sh
+++ b/tests/rm/r-1.sh
@@ -23,8 +23,8 @@ mkdir a a/a || framework_failure_
> b || framework_failure_
cat <<\EOF > exp || framework_failure_
-removed directory: 'a/a'
-removed directory: 'a'
+removed directory 'a/a'
+removed directory 'a'
removed 'b'
EOF
diff --git a/tests/rm/r-2.sh b/tests/rm/r-2.sh
index a99bdbf4b..a6616f648 100755
--- a/tests/rm/r-2.sh
+++ b/tests/rm/r-2.sh
@@ -25,8 +25,8 @@ mkdir t t/a t/a/b || framework_failure_
# FIXME: if this fails, it's a framework failure
cat <<\EOF | sort > t/E || framework_failure_
-removed directory: 't/a'
-removed directory: 't/a/b'
+removed directory 't/a'
+removed directory 't/a/b'
removed 't/a/b/g'
removed 't/a/f'
EOF
diff --git a/tests/rm/v-slash.sh b/tests/rm/v-slash.sh
index 5cabb0bc6..5a5d401d5 100755
--- a/tests/rm/v-slash.sh
+++ b/tests/rm/v-slash.sh
@@ -26,7 +26,7 @@ touch a/x || framework_failure_
rm --verbose -r a/// > out || fail=1
cat <<\EOF > exp || fail=1
removed 'a/x'
-removed directory: 'a/'
+removed directory 'a/'
EOF
compare exp out || fail=1