case1.tests 893 B

12345678910111213141516171819202122232425
  1. case w in a) echo SKIP;; w) echo OK_1;; w) echo WRONG;; esac
  2. case w in
  3. a) echo SKIP;;
  4. w)echo OK_1 ;;
  5. w)
  6. echo WRONG
  7. ;;
  8. esac
  9. t=w
  10. case $t in a) echo SKIP;; w) echo OK_21;; w) echo WRONG;; esac;
  11. case "$t" in a) echo SKIP;; w) echo OK_22;; w) echo WRONG;; esac;
  12. case w in a) echo SKIP;; $t) echo OK_23;; "$t") echo WRONG;; esac;
  13. case '' in a) echo SKIP;; w) echo WRONG;; *) echo OK_31;; esac;
  14. case '' in a) echo SKIP;; '') echo OK_32;; *) echo WRONG;; esac;
  15. case `echo w` in a) echo SKIP;; w) echo OK_41;; w) echo WRONG;; esac;
  16. case "`echo w`" in a) echo SKIP;; w) echo OK_42;; w) echo WRONG;; esac;
  17. case `echo w w` in a) echo SKIP;; w) echo WRONG;; 'w w') echo OK_43;; esac;
  18. case `echo w w` in a) echo SKIP;; w) echo WRONG;; w*) echo OK_44;; esac;
  19. case w in `echo w`) echo OK_51;; `echo WRONG >&2`w) echo WRONG;; esac;
  20. case w in `echo OK_52 >&2`) echo SKIP;; `echo`w) echo OK_53;; esac;