3
0

strops1.tests 359 B

123456789101112131415
  1. v='*.z'
  2. [[ a.z = *.z ]]; echo 1:YES:$?
  3. [[ a.z == $v ]]; echo 2:YES:$?
  4. # wildcards can match a slash
  5. [[ a/b = a*b ]]; echo 3:YES:$?
  6. [[ a/b == a?b ]]; echo 4:YES:$?
  7. # wildcards can match a leading dot
  8. [[ a/.b = a/*b ]]; echo 5:YES:$?
  9. [[ a/.b == a/?b ]]; echo 6:YES:$?
  10. # wildcards can be escaped
  11. [[ abc = a*c ]]; echo 7:YES:$?
  12. [[ abc == a\*c ]]; echo 8:no:$?