aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-glob
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush_test/hush-glob')
-rw-r--r--shell/hush_test/hush-glob/glob_bkslash_in_var.right4
-rwxr-xr-xshell/hush_test/hush-glob/glob_bkslash_in_var.tests10
2 files changed, 14 insertions, 0 deletions
diff --git a/shell/hush_test/hush-glob/glob_bkslash_in_var.right b/shell/hush_test/hush-glob/glob_bkslash_in_var.right
new file mode 100644
index 000000000..f1484b9e4
--- /dev/null
+++ b/shell/hush_test/hush-glob/glob_bkslash_in_var.right
@@ -0,0 +1,4 @@
+Unquoted non-matching glob in var:'test*.TMP/\name_doesnt_exist'
+Unquoted matching glob in var: 'testdir.TMP/name'
+Quoted non-matching glob in var: 'test*.TMP/\name_doesnt_exist'
+Quoted matching glob in var: 'test*.TMP/\name'
diff --git a/shell/hush_test/hush-glob/glob_bkslash_in_var.tests b/shell/hush_test/hush-glob/glob_bkslash_in_var.tests
new file mode 100755
index 000000000..e3dedc4ac
--- /dev/null
+++ b/shell/hush_test/hush-glob/glob_bkslash_in_var.tests
@@ -0,0 +1,10 @@
+mkdir testdir.TMP
+>testdir.TMP/name
+a="test*.TMP/\name_doesnt_exist"
+b="test*.TMP/\name"
+printf "Unquoted non-matching glob in var:'%s'\n" $a
+printf "Unquoted matching glob in var: '%s'\n" $b
+printf "Quoted non-matching glob in var: '%s'\n" "$a"
+printf "Quoted matching glob in var: '%s'\n" "$b"
+rm -f testdir.TMP/name
+rmdir testdir.TMP