########################################################################
# #
# This software is part of the ast package #
# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
# Florham Park NJ #
# #
# David Korn <dgk@research.att.com> #
# #
########################################################################
function err_exit
{
print -u2 -n "\t"
let Errors+=1
}
alias err_exit='err_exit $LINENO'
integer Errors=0
do foo=0
case $i in
${bar%?}5)
foo=5;;
"${bar%?}6")
foo=6;;
esac
then err_exit "$i not matching correct pattern"
fi
done
f="[ksh92]"
case $f in
\[*\]) ;;
*) err_exit "$f does not match \[*\]";;
esac
if [[ $($SHELL -c '
x=$(case abc {
abc) { print yes;};;
*) print no;;
}
)
then err_exit 'case abc {...} not working'
fi
[[ $($SHELL -c 'case a in
b) print b;;
tmp=foo
for i in a b
do case $i in
b) ( tmp=bar )
for j in a
do print -r -- $tmp.h
done
;;
esac
done