/titanic_51/usr/src/contrib/ast/src/cmd/ksh93/tests/ |
H A D | bracket.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 36 then err_exit "-z: null string should be of zero length" 41 then err_exit "-z: $file string should not be of zero length" 44 then err_exit "-a: $file shouldn't exist" 47 then err_exit "-e: $file shouldn't exist" 51 then err_exit "-a: $file should exist" 54 then err_exit " [all...] |
H A D | substring.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 33 then err_exit "string1:0" 36 then err_exit "string1: -1" 39 then err_exit "string1:0" 42 then err_exit "string1:1" 45 then err_exit "string1:1:4" 48 then err_exit "string1: -5:4" 51 then err_exit "string [all...] |
H A D | builtins.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 36 : ${foo=bar} || err_exit ": failed" 37 [[ $foo == bar ]] || err_exit ": side effects failed" 39 [[ $# == 2 && $1 == - && $2 == foobar ]] || err_exit "set -- - foobar failed" 41 [[ $# == 2 && $1 == -x && $2 == foobar ]] || err_exit "set -- -x foobar failed" 42 getopts :x: foo || err_exit "getopts :x: returns false" 43 [[ $foo == x && $OPTARG == foobar ]] || err_exit "getopt [all...] |
H A D | arrays.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 45 then err_exit '$x is not element 0' 48 then err_exit '${x[0] is not element 0' 51 then err_exit "length of ${x[0]} is not 4" 54 then err_exit 'number of elements of x is not 6' 57 then err_exit ' element two is not 2' 60 then err_exit ' [all...] |
H A D | attributes.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 39 (r=newval) 2> /dev/null && err_exit readonly attribute fails 42 then err_exit integer attributes fails 45 then err_exit integer base 8 fails 48 then err_exit uppercase fails 51 then err_exit lowercase fails 54 then err_exit referenc [all...] |
H A D | options.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 36 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 43 then err_exit "${SHELL-ksh} -s not working" 51 then err_exit 'sh -e not working' 53 [[ $($SHELL -D -c 'print hi; print $"hello"') == '"hello"' ]] || err_exit 'ksh -D not working' 67 err_exit "\$ENV file &>/dev/null does not redirect stdout -- expected '', got $got" 73 err_exit "\$ENV file &>/dev/null does not redirect stderr -- expected one diagnostic line, got $got" 81 err_exit 'privilege [all...] |
H A D | basic.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 53 [[ $g == $2 ]] || err_exit "umask 0; umask $1 failed -- expected $2, got $g" 56 umask u=rwx,go=rx || err_exit "umask u=rws,go=rx failed" 58 then err_exit 'umask -S incorrect' 62 cd $tmp || { err_exit "cd $tmp failed"; exit 1; } 67 [[ -r foobar ]] || err_exit 'umask not being restored after subshell' 82 then err_exit 'fil [all...] |
H A D | variables.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 34 [[ ${.sh.version} == "$KSH_VERSION" ]] || err_exit '.sh.version != KSH_VERSION' 36 [[ ${@ss} ]] && err_exit '${@ss} should be empty string when ss is unset' 37 [[ ${!ss} == ss ]] || err_exit '${!ss} should be ss when ss is unset' 38 [[ ${#ss} == 0 ]] || err_exit '${#ss} should be 0 when ss is unset' 41 then err_exit RANDOM variable not working 46 then err_exit SECOND [all...] |
H A D | functions.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 36 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 59 then err_exit "command print not working inside print function" 64 then err_exit 'global variables not correct' 68 then err_exit '$0 not correct' 72 then err_exit 'environment override not correct' 75 then err_exit 'scoping error' 79 then err_exit no [all...] |
/titanic_51/usr/src/lib/libshell/common/tests/ |
H A D | bracket.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 36 then err_exit "-z: null string should be of zero length" 41 then err_exit "-z: $file string should not be of zero length" 44 then err_exit "-a: $file shouldn't exist" 48 then err_exit "-a: $file should exist" 52 then err_exit "-r: $file should be readable" 55 then err_exit "-w: $file should be writable" 58 then err_exit "-x: $file should be executable" [all …]
|
H A D | substring.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 33 then err_exit "string1:0" 36 then err_exit "string1: -1" 39 then err_exit "string1:0" 42 then err_exit "string1:1" 45 then err_exit "string1:1:4" 48 then err_exit "string1: -5:4" 51 then err_exit "string1:1:j" 54 then err_exit "string1:(j?1:0):j" [all …]
|
H A D | arrays.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 45 then err_exit '$x is not element 0' 48 then err_exit '${x[0] is not element 0' 51 then err_exit "length of ${x[0]} is not 4" 54 then err_exit 'number of elements of x is not 6' 57 then err_exit ' element two is not 2' 60 then err_exit ' ${x[@]:2:1} is not two' 64 then err_exit '$x is not element 0' [all …]
|
H A D | options.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 36 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 43 then err_exit "${SHELL-ksh} -s not working" 51 then err_exit 'sh -e not working' 53 [[ $($SHELL -D -c 'print hi; print $"hello"') == '"hello"' ]] || err_exit 'ksh -D not working' 67 err_exit "\$ENV file &>/dev/null does not redirect stdout -- expected '', got $got" 73 …err_exit "\$ENV file &>/dev/null does not redirect stderr -- expected one diagnostic line, got $go… 81 err_exit 'privileged nointeractive shell reads $ENV file' 83 err_exit 'privileged -E reads $ENV file' [all …]
|
H A D | builtins.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 36 : ${foo=bar} || err_exit ": failed" 37 [[ $foo = bar ]] || err_exit ": side effects failed" 42 getopts :x: foo || err_exit "getopts :x: returns false" 43 [[ $foo = x && $OPTARG = foobar ]] || err_exit "getopts :x: failed" 47 then err_exit "'getopts :r:s var -r' not working" 52 then err_exit "'getopts :d#u OPT=d OPTARG=16177' failed -- OPT=$OPT OPTARG=$OPTARG" 56 do [[ $OPTIND == $((OPTIND)) ]] || err_exit "OPTIND optimization bug" [all …]
|
H A D | sun_solaris_builtin_sum.sh | 32 function err_exit function 38 alias err_exit='err_exit $LINENO' alias 47 builtin sum || err_exit "sum builtin not found" 50 x="$(print 'hello' | /usr/bin/sum)" || err_exit "/usr/bin/sum pipe failed." 51 [[ "$x" == "542 1" ]] || err_exit "print 'hello' | /usr/bin/sum did not return 542 1, got $x" 52 x="$(print 'hello' | sum)" || err_exit "sum builtin pipe failed." 53 [[ "$x" == "542 1" ]] || err_exit "print 'hello' | sum builtin did not return 542 1, got $x" 54 x="$(print 'hello' | sum -x md5)" || err_exit "sum md5 builtin pipe failed." 55 [[ "$x" == "b1946ac92492d2347c6235b4d2611184" ]] || err_exit "print 'hello' | sum md5 builtin did n… 56 x="$(print 'hello' | sum -x sha1)" || err_exit "sum sha1 builtin pipe failed." [all …]
|
H A D | attributes.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 39 (r=newval) 2> /dev/null && err_exit readonly attribute fails 42 then err_exit integer attributes fails 45 then err_exit integer base 8 fails 48 then err_exit uppercase fails 51 then err_exit lowercase fails 54 then err_exit reference variables fail 57 then err_exit tagged fails [all …]
|
H A D | basic.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 53 [[ $g == $2 ]] || err_exit "umask 0; umask $1 failed -- expected $2, got $g" 56 umask u=rwx,go=rx || err_exit "umask u=rws,go=rx failed" 58 then err_exit 'umask -S incorrect' 62 cd $tmp || { err_exit "cd $tmp failed"; exit 1; } 67 [[ -r foobar ]] || err_exit 'umask not being restored after subshell' 82 then err_exit 'file expansion with trailing / not working' 85 then err_exit 'file expansion with single file not working' [all …]
|
H A D | variables.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 34 [[ ${.sh.version} == "$KSH_VERSION" ]] || err_exit '.sh.version != KSH_VERSION' 36 [[ ${@ss} ]] && err_exit '${@ss} should be empty string when ss is unset' 37 [[ ${!ss} == ss ]] || err_exit '${!ss} should be ss when ss is unset' 41 then err_exit RANDOM variable not working 46 then err_exit SECONDS variable not working 51 then err_exit _ variable not working 63 then err_exit PWD variable failed, not equivalent to . [all …]
|
H A D | sun_solaris_compound_misc.sh | 33 function err_exit function 39 alias err_exit='err_exit $LINENO' alias 76 tmpdir="$(mktemp -t -d "test_sun_solaris_compound_misc.XXXXXXXX")" || err_exit "Cannot create tempo… 78 cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; } 93 [[ "$cx" == "$cy" ]] || err_exit "'$cx' != '$cy'" 94 [[ "$cx" == "$cz" ]] || err_exit "'$cx' != '$cz'" 95 [[ "$cy" == "$cz" ]] || err_exit "'$cy' != '$cz'" 97 count_brackets "$cx" || err_exit "Brackets not balanced for '$cx'" 98 count_brackets "$cy" || err_exit "Brackets not balanced for '$cy'" 99 count_brackets "$cz" || err_exit "Brackets not balanced for '$cz'" [all …]
|
H A D | sun_solaris_compoundvario.sh | 27 function err_exit function 33 alias err_exit='err_exit $LINENO' alias 158 } || err_exit "test returned exit code $?" 160 [[ "${s}" == "xhellox" ]] || err_exit "Expected 'xhellox', got ${s}" 161 count_brackets "$y" || err_exit "y: bracket open ${bracketstat.bopen} != bracket close ${bracketsta… 162 count_brackets "$(print -v y)" || err_exit "y: bracket open ${bracketstat.bopen} != bracket close $… 163 count_brackets "$(print -C y)" || err_exit "y: bracket open ${bracketstat.bopen} != bracket close $… 166 unset x y || err_exit "unset failed" 167 [[ "$x" == "" ]] || err_exit "cleanup failed for x" 168 [[ "$y" == "" ]] || err_exit "cleanup failed for y" [all …]
|
H A D | functions.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 33 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 56 then err_exit "command print not working inside print function" 61 then err_exit 'global variables not correct' 65 then err_exit '$0 not correct' 69 then err_exit 'environment override not correct' 72 then err_exit 'scoping error' 76 then err_exit non-local variables 81 then err_exit EXIT trap in wrong scope [all …]
|
H A D | io.sh | 20 function err_exit function 26 alias err_exit='err_exit $LINENO' alias 31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; } 48 [[ $a == foo ]] || err_exit "bad file descriptor $i in comsub script" 51 [[ $(fun) == good ]] || err_exit 'file 3 closed before subshell completes' 53 cd $tmp || { err_exit "cd $tmp failed"; exit ; } 57 then err_exit 'append (>>) not working' 64 then err_exit "read on <> fd failed -- expected '$exp', got '$line'" 67 then err_exit 'noclobber not causing exclusive open' 91 …[[ $semantics == @(${FDFS[fdfs].semantics}) ]] || err_exit "'4< ${FDFS[fdfs].dir}/3' $semantics se… [all …]
|
/titanic_51/usr/src/cmd/ast/libshell/common/tests/ |
H A D | sun_solaris_builtin_sum.sh | 32 function err_exit function 38 alias err_exit='err_exit $LINENO' alias 47 builtin sum || err_exit "sum builtin not found" 50 x="$(print 'hello' | /usr/bin/sum)" || err_exit "/usr/bin/sum pipe failed." 51 [[ "$x" == "542 1" ]] || err_exit "print 'hello' | /usr/bin/sum did not return 542 1, got $x" 52 x="$(print 'hello' | sum)" || err_exit "sum builtin pipe failed." 53 [[ "$x" == "542 1" ]] || err_exit "print 'hello' | sum builtin did not return 542 1, got $x" 54 x="$(print 'hello' | sum -x md5)" || err_exit "sum md5 builtin pipe failed." 55 [[ "$x" == "b1946ac92492d2347c6235b4d2611184" ]] || err_exit "prin [all...] |
H A D | sun_solaris_compound_misc.sh | 33 function err_exit function 39 alias err_exit='err_exit $LINENO' alias 76 tmpdir="$(mktemp -t -d "test_sun_solaris_compound_misc.XXXXXXXX")" || err_exit "Cannot create temporary directory" 78 cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; } 93 [[ "$cx" == "$cy" ]] || err_exit "'$cx' != '$cy'" 94 [[ "$cx" == "$cz" ]] || err_exit "'$cx' != '$cz'" 95 [[ "$cy" == "$cz" ]] || err_exit "'$cy' != '$cz'" 97 count_brackets "$cx" || err_exit "Brackets not balanced for '$cx'" 98 count_brackets "$cy" || err_exit "Bracket [all...] |
H A D | sun_solaris_compoundvario.sh | 27 function err_exit function 33 alias err_exit='err_exit $LINENO' alias 158 } || err_exit "test returned exit code $?" 160 [[ "${s}" == "xhellox" ]] || err_exit "Expected 'xhellox', got ${s}" 161 count_brackets "$y" || err_exit "y: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}" 162 count_brackets "$(print -v y)" || err_exit "y: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}" 163 count_brackets "$(print -C y)" || err_exit "y: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}" 166 unset x y || err_exit "unset failed" 167 [[ "$x" == "" ]] || err_exit "cleanu [all...] |