Date: Sun, 11 Sep 2011 21:38:33 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r225494 - in stable/8/tools/regression/bin/sh: builtins parser Message-ID: <201109112138.p8BLcX2a096995@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Sun Sep 11 21:38:33 2011 New Revision: 225494 URL: http://svn.freebsd.org/changeset/base/225494 Log: MFC r223007,r223011,r223546,r224104: sh: New testcases that already work in stable/8. Added: stable/8/tools/regression/bin/sh/builtins/case10.0 - copied unchanged from r223546, head/tools/regression/bin/sh/builtins/case10.0 stable/8/tools/regression/bin/sh/builtins/case6.0 - copied unchanged from r223007, head/tools/regression/bin/sh/builtins/case6.0 stable/8/tools/regression/bin/sh/builtins/case7.0 - copied unchanged from r223011, head/tools/regression/bin/sh/builtins/case7.0 stable/8/tools/regression/bin/sh/parser/alias6.0 - copied unchanged from r224104, head/tools/regression/bin/sh/parser/alias6.0 Modified: Directory Properties: stable/8/tools/regression/bin/sh/ (props changed) Copied: stable/8/tools/regression/bin/sh/builtins/case10.0 (from r223546, head/tools/regression/bin/sh/builtins/case10.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/case10.0 Sun Sep 11 21:38:33 2011 (r225494, copy of r223546, head/tools/regression/bin/sh/builtins/case10.0) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +case ! in +[\!!]) ;; +*) echo Failed at $LINENO ;; +esac + +case ! in +['!'!]) ;; +*) echo Failed at $LINENO ;; +esac + +case ! in +["!"!]) ;; +*) echo Failed at $LINENO ;; +esac Copied: stable/8/tools/regression/bin/sh/builtins/case6.0 (from r223007, head/tools/regression/bin/sh/builtins/case6.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/case6.0 Sun Sep 11 21:38:33 2011 (r225494, copy of r223007, head/tools/regression/bin/sh/builtins/case6.0) @@ -0,0 +1,52 @@ +# $FreeBSD$ + +unset LC_ALL +LC_CTYPE=de_DE.ISO8859-1 +export LC_CTYPE + +c1=e +# o umlaut +c2=$(printf '\366') +# non-break space +c3=$(printf '\240') +c4=$(printf '\240') +# $c2$c3$c4 form one utf-8 character + +ok=0 +case $c1$c2$c3$c4 in +*) ok=1 ;; +esac +if [ $ok = 0 ]; then + echo wrong at $LINENO + exit 3 +fi + +case $c1$c2$c3$c4 in +$c1$c2$c3$c4) ;; +*) echo wrong at $LINENO ;; +esac + +case $c1$c2$c3$c4 in +"$c1$c2$c3$c4") ;; +*) echo wrong at $LINENO ;; +esac + +case $c1$c2$c3$c4 in +????) ;; +*) echo wrong at $LINENO ;; +esac + +case $c1$c2$c3$c4 in +[!$c2][!b][!c][!d]) ;; +*) echo wrong at $LINENO ;; +esac + +case $c1$c2$c3$c4 in +[$c1][$c2][$c3][$c4]) ;; +*) echo wrong at $LINENO ;; +esac + +case $c1$c2$c3$c4 in +["$c1"]["$c2"]["$c3"]["$c4"]) ;; +*) echo wrong at $LINENO ;; +esac Copied: stable/8/tools/regression/bin/sh/builtins/case7.0 (from r223011, head/tools/regression/bin/sh/builtins/case7.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/case7.0 Sun Sep 11 21:38:33 2011 (r225494, copy of r223011, head/tools/regression/bin/sh/builtins/case7.0) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +# Character ranges in a locale other than the POSIX locale, not specified +# by POSIX. + +unset LC_ALL +LC_CTYPE=de_DE.ISO8859-1 +export LC_CTYPE +LC_COLLATE=de_DE.ISO8859-1 +export LC_COLLATE + +c1=e +# o umlaut +c2=$(printf '\366') + +case $c1$c2 in +[a-z][a-z]) ;; +*) echo wrong at $LINENO ;; +esac + +case $c1$c2 in +[a-f][n-p]) ;; +*) echo wrong at $LINENO ;; +esac Copied: stable/8/tools/regression/bin/sh/parser/alias6.0 (from r224104, head/tools/regression/bin/sh/parser/alias6.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/parser/alias6.0 Sun Sep 11 21:38:33 2011 (r225494, copy of r224104, head/tools/regression/bin/sh/parser/alias6.0) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +alias alias0='| cat >/dev/null' + +eval '{ echo bad; } alias0' +eval '(echo bad)alias0'
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109112138.p8BLcX2a096995>