From 0e060d9fef64727aa2d41f00f8217c61166bb2e0 Mon Sep 17 00:00:00 2001 From: Pádraig Brady
Date: Tue, 4 Oct 2016 13:43:32 +0100
Subject: rm: disallow --n alias for --no-preserve-root
* src/rm.c (main): Ensure the full --no-preserve-root
option is specified, rather than allowing --n etc.
* tests/rm/r-root.sh: Add a test case.
* NEWS: Mention the change in behavior.
Improved by Jim Meyering.
Fixes http://bugs.gnu.org/24604
---
tests/rm/r-root.sh | 9 +++++++++
1 file changed, 9 insertions(+)
(limited to 'tests')
diff --git a/tests/rm/r-root.sh b/tests/rm/r-root.sh
index b98db141b..3b7837fe0 100755
--- a/tests/rm/r-root.sh
+++ b/tests/rm/r-root.sh
@@ -210,6 +210,15 @@ for opts in \
test $fail = 1 && { cat out; cat err; Exit $fail; }
done
+#-------------------------------------------------------------------------------
+# Exercise with --no-preserve to ensure shortened equivalent is not allowed.
+cat <