Skip to content

Commit

Permalink
Fix test case related to pattern matching in 'case'
Browse files Browse the repository at this point in the history
Thanks to Martijn Dekker(@McDutchie) for the fix.
Related: #476
  • Loading branch information
siteshwar committed Apr 25, 2018
1 parent 9b8391a commit eb97b0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cmd/ksh93/tests/case.sh
Expand Up @@ -86,5 +86,7 @@ x=$($SHELL -ec 'case a in a) echo 1; false; echo 2 ;& b) echo 3;; esac')

# https://github.com/att/ast/issues/476
case "[0-9]" in
[0-9]) log_error 'literal "[0-9]" matches pattern [0-9]';;
[0-9]) log_error "Shell should not match pattern as literal string in case command";;
"[0-9]") ;;
*) log_error "Shell fails to match quoted pattern-like string as literal string";;
esac

0 comments on commit eb97b0e

Please sign in to comment.