aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-bugs
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush_test/hush-bugs')
-rw-r--r--shell/hush_test/hush-bugs/strops5_bug.right2
-rwxr-xr-xshell/hush_test/hush-bugs/strops5_bug.tests10
2 files changed, 12 insertions, 0 deletions
diff --git a/shell/hush_test/hush-bugs/strops5_bug.right b/shell/hush_test/hush-bugs/strops5_bug.right
new file mode 100644
index 000000000..aba7bb429
--- /dev/null
+++ b/shell/hush_test/hush-bugs/strops5_bug.right
@@ -0,0 +1,2 @@
+4:no:1
+5:YES:0
diff --git a/shell/hush_test/hush-bugs/strops5_bug.tests b/shell/hush_test/hush-bugs/strops5_bug.tests
new file mode 100755
index 000000000..3e24df768
--- /dev/null
+++ b/shell/hush_test/hush-bugs/strops5_bug.tests
@@ -0,0 +1,10 @@
+v='*.z'
+
+# Buggy:
+# the problem is that expansion rules of LHS and RHS of ~=
+# should not be the same: in RHS, "$v" and "*" should escape metas
+# (currently "$v" does not),
+# but in LHS, they should _not_ do that
+# (currently "*" does). Thus these cases fail:
+[[ a.z == "$v" ]]; echo 4:no:$? # BUG: "$v" expands to *.z
+[[ "*".z == ?.z ]]; echo 5:YES:$? # BUG: "*" expands to \*