From f451b2cfe042e3029b73261758b9ab7e956eaa03 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 9 Jun 2012 02:06:57 +0200 Subject: ash: fix a bug in >${varexp} handling. Closes 5282 Signed-off-by: Denys Vlasenko --- shell/ash_test/ash-redir/redirA.tests | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 shell/ash_test/ash-redir/redirA.tests (limited to 'shell/ash_test/ash-redir/redirA.tests') diff --git a/shell/ash_test/ash-redir/redirA.tests b/shell/ash_test/ash-redir/redirA.tests new file mode 100755 index 000000000..56833f938 --- /dev/null +++ b/shell/ash_test/ash-redir/redirA.tests @@ -0,0 +1,11 @@ +x="tmp11:tmp22" + +# Bug was incorrectly expanding variables in >redir +echo "${x%:*}" >"${x%:*}" +echo tmp1* +rm tmp1* + +# Also try unquoted +echo "${x%:*}" >${x%:*} +echo tmp1* +rm tmp1* -- cgit v1.2.3