3
0

bkslash_case1.tests 549 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Case argument is globbed, match patterns are not.
  2. # This caught some bugs in the past.
  3. case z in
  4. \z ) echo ok1 ;;
  5. * ) echo BUG ;;
  6. esac
  7. case \z in
  8. z ) echo ok2 ;;
  9. * ) echo BUG ;;
  10. esac
  11. case \z in
  12. \z ) echo ok3 ;;
  13. * ) echo BUG ;;
  14. esac
  15. case z in
  16. \z ) echo ok4 ;;
  17. * ) echo BUG ;;
  18. esac
  19. case \\z in
  20. \\z ) echo ok5 ;;
  21. * ) echo BUG ;;
  22. esac
  23. echo Ok:$?
  24. case "\z" in
  25. "\z" ) echo ok6 ;;
  26. * ) echo BUG ;;
  27. esac
  28. case "\\z" in
  29. "\\z" ) echo ok7 ;;
  30. * ) echo BUG ;;
  31. esac
  32. case "\\\z" in
  33. "\\\z") echo ok8 ;;
  34. * ) echo BUG ;;
  35. esac
  36. echo Ok:$?