mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
...and now make it work with shcomp (re: aed5c6d7
)
This commit is contained in:
parent
aed5c6d70a
commit
844e6b2410
52 changed files with 52 additions and 52 deletions
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
alias foo='print hello'
|
alias foo='print hello'
|
||||||
if [[ $(foo) != hello ]]
|
if [[ $(foo) != hello ]]
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
{
|
{
|
||||||
x=abc
|
x=abc
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
trap '' FPE # NOTE: osf.alpha requires this (no ieee math)
|
trap '' FPE # NOTE: osf.alpha requires this (no ieee math)
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
function fun
|
function fun
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
for ((i=0; i < 4; i++ ))
|
for ((i=0; i < 4; i++ ))
|
||||||
do for ((j=0; j < 5; j++ ))
|
do for ((j=0; j < 5; j++ ))
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
# ======
|
# ======
|
||||||
# as of 93u+, typeset -xu/-xl failed to change case in a value (rhbz#1188377)
|
# as of 93u+, typeset -xu/-xl failed to change case in a value (rhbz#1188377)
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
bincat=$(whence -p cat)
|
bincat=$(whence -p cat)
|
||||||
binecho=$(whence -p echo)
|
binecho=$(whence -p echo)
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
null=''
|
null=''
|
||||||
if [[ ! -z $null ]]
|
if [[ ! -z $null ]]
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
bincat=$(whence -p cat)
|
bincat=$(whence -p cat)
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
bar=foo2
|
bar=foo2
|
||||||
bam=foo[3]
|
bam=foo[3]
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
#test for compound variables
|
#test for compound variables
|
||||||
Command=${0##*/}
|
Command=${0##*/}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
# "nounset" disabled for now
|
# "nounset" disabled for now
|
||||||
#set -o nounset
|
#set -o nounset
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
########################################################################
|
########################################################################
|
||||||
# test the behavior of co-processes
|
# test the behavior of co-processes
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
if [[ -d /cygdrive ]]
|
if [[ -d /cygdrive ]]
|
||||||
then err_exit cygwin detected - coprocess tests disabled - enable at the risk of wedging your system
|
then err_exit cygwin detected - coprocess tests disabled - enable at the risk of wedging your system
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
integer n=2
|
integer n=2
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
enum Color_t=(red green blue orange yellow)
|
enum Color_t=(red green blue orange yellow)
|
||||||
enum -i Sex_t=(Male Female)
|
enum -i Sex_t=(Male Female)
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
function abspath
|
function abspath
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
# {...} expansion tests -- ignore if not supported
|
# {...} expansion tests -- ignore if not supported
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
compiled=''
|
compiled=''
|
||||||
read -n4 c < $0 2> /dev/null
|
read -n4 c < $0 2> /dev/null
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
function test_glob
|
function test_glob
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
function grep
|
function grep
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
bincat=$(whence -p cat)
|
bincat=$(whence -p cat)
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
unset HISTFILE
|
unset HISTFILE
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
# All the tests here should run with job control on
|
# All the tests here should run with job control on
|
||||||
set -o monitor
|
set -o monitor
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
# Determine method for running tests.
|
# Determine method for running tests.
|
||||||
# The 'vmstate' builtin can be used if ksh was compiled with vmalloc.
|
# The 'vmstate' builtin can be used if ksh was compiled with vmalloc.
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
unset LANG LANGUAGE "${!LC_@}"
|
unset LANG LANGUAGE "${!LC_@}"
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
function checkref
|
function checkref
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
if((!SHOPT_NAMESPACE))
|
if((!SHOPT_NAMESPACE))
|
||||||
then warning 'shell compiled without SHOPT_NAMESPACE; skipping tests'
|
then warning 'shell compiled without SHOPT_NAMESPACE; skipping tests'
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
unset HISTFILE
|
unset HISTFILE
|
||||||
export LC_ALL=C ENV=/./dev/null
|
export LC_ALL=C ENV=/./dev/null
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
# to avoid spurious test failures with 'whence -a' tests, we need
|
# to avoid spurious test failures with 'whence -a' tests, we need
|
||||||
# to remove any duplicate paths to the same directory from $PATH.
|
# to remove any duplicate paths to the same directory from $PATH.
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
typeset -T Pt_t=(
|
typeset -T Pt_t=(
|
||||||
float x=1
|
float x=1
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
# These are tests for the interactive shell, run in a pseudoterminal utility
|
# These are tests for the interactive shell, run in a pseudoterminal utility
|
||||||
# called 'pty', which allows for scripting interactive sessions and which is
|
# called 'pty', which allows for scripting interactive sessions and which is
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
binecho=$(whence -p echo)
|
binecho=$(whence -p echo)
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
set -o noglob
|
set -o noglob
|
||||||
if [[ 'hi there' != "hi there" ]]
|
if [[ 'hi there' != "hi there" ]]
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
tmp1=$tmp/tmp1.csv
|
tmp1=$tmp/tmp1.csv
|
||||||
tmp2=$tmp/tmp2.csv
|
tmp2=$tmp/tmp2.csv
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
typeset -T Pt_t=(
|
typeset -T Pt_t=(
|
||||||
float x=1
|
float x=1
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
binecho=$(whence -p echo)
|
binecho=$(whence -p echo)
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
########################################################################
|
########################################################################
|
||||||
# test the behavior of return and exit with functions
|
# test the behavior of return and exit with functions
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
unset HISTFILE
|
unset HISTFILE
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
PS3='ABC '
|
PS3='ABC '
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,7 @@ function valxml
|
||||||
|
|
||||||
command set +o posix 2>/dev/null
|
command set +o posix 2>/dev/null
|
||||||
unset DISPLAY FIGNORE HISTFILE POSIXLY_CORRECT _AST_FEATURES
|
unset DISPLAY FIGNORE HISTFILE POSIXLY_CORRECT _AST_FEATURES
|
||||||
export ENV=/./dev/null
|
export ENV=/./dev/null SHTESTS_COMMON=$PWD/_common
|
||||||
trap + PIPE # unadvertized -- set SIGPIPE to SIG_DFL #
|
trap + PIPE # unadvertized -- set SIGPIPE to SIG_DFL #
|
||||||
|
|
||||||
integer compile=-1 posix=-1 utf8=-1
|
integer compile=-1 posix=-1 utf8=-1
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
float DELAY=${1:-0.02}
|
float DELAY=${1:-0.02}
|
||||||
integer FOREGROUND=10 BACKGROUND=2
|
integer FOREGROUND=10 BACKGROUND=2
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
unset n s t
|
unset n s t
|
||||||
typeset -A SIG
|
typeset -A SIG
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
# Written by Roland Mainz <roland.mainz@nrubsig.org>
|
# Written by Roland Mainz <roland.mainz@nrubsig.org>
|
||||||
#
|
#
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
typeset -F SECONDS # for fractional seconds in PS4
|
typeset -F SECONDS # for fractional seconds in PS4
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
tmpPS4='+ [temp_PS4|L$LINENO|e$?] ' # used to avoid interference to ${.sh.match} from $PS4 set by shtests
|
tmpPS4='+ [temp_PS4|L$LINENO|e$?] ' # used to avoid interference to ${.sh.match} from $PS4 set by shtests
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
if $SHELL -c '[[ ~root == /* ]]'
|
if $SHELL -c '[[ ~root == /* ]]'
|
||||||
then x=$(print -r -- ~root)
|
then x=$(print -r -- ~root)
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
typeset -T Time_t=(
|
typeset -T Time_t=(
|
||||||
integer .=-1
|
integer .=-1
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
# Use is subject to license terms.
|
# Use is subject to license terms.
|
||||||
#
|
#
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
#
|
#
|
||||||
# This test checks whether "typeset -m" correctly moves local variables
|
# This test checks whether "typeset -m" correctly moves local variables
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
integer n=2
|
integer n=2
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
[[ ${.sh.version} == "$KSH_VERSION" ]] || err_exit '.sh.version != KSH_VERSION'
|
[[ ${.sh.version} == "$KSH_VERSION" ]] || err_exit '.sh.version != KSH_VERSION'
|
||||||
unset ss
|
unset ss
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
# and "unset" handling.
|
# and "unset" handling.
|
||||||
#
|
#
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
function build_tree
|
function build_tree
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
# and "unset" handling.
|
# and "unset" handling.
|
||||||
#
|
#
|
||||||
|
|
||||||
. "${0%/*}/_common"
|
. "${SHTESTS_COMMON:-${0%/*}/_common}"
|
||||||
|
|
||||||
# "built_tree1" and "built_tree2" are identical except the way how they test
|
# "built_tree1" and "built_tree2" are identical except the way how they test
|
||||||
# whether a variable exists:
|
# whether a variable exists:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue