3
0

strops5.tests 474 B

12345678910111213
  1. v='*.z'
  2. [[ a.z = *.z ]]; echo 1:YES:$?
  3. [[ a.z = "*".z ]]; echo 2:no:$?
  4. [[ a.z == $v ]]; echo 3:YES:$?
  5. # Buggy:
  6. # the problem is that expansion rules of LHS and RHS of ~=
  7. # should not be the same: in RHS, "$v" and "*" should escape metas
  8. # (currently "$v" does not),
  9. # but in LHS, they should _not_ do that
  10. # (currently "*" does). Thus these cases fail:
  11. #[[ a.z == "$v" ]]; echo 4:no:$? # BUG: "$v" expands to *.z
  12. #[[ "*".z == ?.z ]]; echo 5:YES:$? # BUG: "*" expands to \*