summaryrefslogtreecommitdiff
path: root/tests/misc/shred-passes.sh
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/misc/shred-passes.sh
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/misc/shred-passes.sh')
-rwxr-xr-xtests/misc/shred-passes.sh64
1 files changed, 32 insertions, 32 deletions
diff --git a/tests/misc/shred-passes.sh b/tests/misc/shred-passes.sh
index ddf788b05..64216fd8a 100755
--- a/tests/misc/shred-passes.sh
+++ b/tests/misc/shred-passes.sh
@@ -24,12 +24,12 @@ print_ver_ shred
# 3 random passes and a single rename.
printf 1 > f || framework_failure_
echo "\
-shred: 'f': pass 1/3 (random)...
-shred: 'f': pass 2/3 (random)...
-shred: 'f': pass 3/3 (random)...
-shred: 'f': removing
-shred: 'f': renamed to 0
-shred: 'f': removed" > exp || framework_failure_
+shred: f: pass 1/3 (random)...
+shred: f: pass 2/3 (random)...
+shred: f: pass 3/3 (random)...
+shred: f: removing
+shred: f: renamed to 0
+shred: f: removed" > exp || framework_failure_
shred -v -u f 2>out || fail=1
compare exp out || fail=1
@@ -39,9 +39,9 @@ compare exp out || fail=1
# to bypass the data passes
touch f || framework_failure_
echo "\
-shred: 'f': removing
-shred: 'f': renamed to 0
-shred: 'f': removed" > exp || framework_failure_
+shred: f: removing
+shred: f: renamed to 0
+shred: f: removed" > exp || framework_failure_
shred -v -u f 2>out || fail=1
compare exp out || fail=1
@@ -52,29 +52,29 @@ compare exp out || fail=1
dd bs=100K count=1 if=/dev/zero | tr '\0' 'U' > Us || framework_failure_
printf 1 > f || framework_failure_
echo "\
-shred: 'f': pass 1/20 (random)...
-shred: 'f': pass 2/20 (ffffff)...
-shred: 'f': pass 3/20 (924924)...
-shred: 'f': pass 4/20 (888888)...
-shred: 'f': pass 5/20 (db6db6)...
-shred: 'f': pass 6/20 (777777)...
-shred: 'f': pass 7/20 (492492)...
-shred: 'f': pass 8/20 (bbbbbb)...
-shred: 'f': pass 9/20 (555555)...
-shred: 'f': pass 10/20 (aaaaaa)...
-shred: 'f': pass 11/20 (random)...
-shred: 'f': pass 12/20 (6db6db)...
-shred: 'f': pass 13/20 (249249)...
-shred: 'f': pass 14/20 (999999)...
-shred: 'f': pass 15/20 (111111)...
-shred: 'f': pass 16/20 (000000)...
-shred: 'f': pass 17/20 (b6db6d)...
-shred: 'f': pass 18/20 (eeeeee)...
-shred: 'f': pass 19/20 (333333)...
-shred: 'f': pass 20/20 (random)...
-shred: 'f': removing
-shred: 'f': renamed to 0
-shred: 'f': removed" > exp || framework_failure_
+shred: f: pass 1/20 (random)...
+shred: f: pass 2/20 (ffffff)...
+shred: f: pass 3/20 (924924)...
+shred: f: pass 4/20 (888888)...
+shred: f: pass 5/20 (db6db6)...
+shred: f: pass 6/20 (777777)...
+shred: f: pass 7/20 (492492)...
+shred: f: pass 8/20 (bbbbbb)...
+shred: f: pass 9/20 (555555)...
+shred: f: pass 10/20 (aaaaaa)...
+shred: f: pass 11/20 (random)...
+shred: f: pass 12/20 (6db6db)...
+shred: f: pass 13/20 (249249)...
+shred: f: pass 14/20 (999999)...
+shred: f: pass 15/20 (111111)...
+shred: f: pass 16/20 (000000)...
+shred: f: pass 17/20 (b6db6d)...
+shred: f: pass 18/20 (eeeeee)...
+shred: f: pass 19/20 (333333)...
+shred: f: pass 20/20 (random)...
+shred: f: removing
+shred: f: renamed to 0
+shred: f: removed" > exp || framework_failure_
shred -v -u -n20 --random-source=Us f 2>out || fail=1
compare exp out || fail=1