Denys Vlasenko | 64981b4 | 2020-11-01 18:47:24 +0100 | [diff] [blame] | 1 | v='*.z' |
2 | |||||
3 | # Buggy: | ||||
4 | # the problem is that expansion rules of LHS and RHS of ~= | ||||
5 | # should not be the same: in RHS, "$v" and "*" should escape metas | ||||
6 | # (currently "$v" does not), | ||||
7 | # but in LHS, they should _not_ do that | ||||
8 | # (currently "*" does). Thus these cases fail: | ||||
9 | [[ a.z == "$v" ]]; echo 4:no:$? # BUG: "$v" expands to *.z | ||||
10 | [[ "*".z == ?.z ]]; echo 5:YES:$? # BUG: "*" expands to \* |