58 lines
1004 B
Bash
Executable File
58 lines
1004 B
Bash
Executable File
|
|
#
|
|
# Copyright (c) 1984,1985,1986,1987,1988,1989,1990 AT&T
|
|
# All Rights Reserved
|
|
#
|
|
# THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T.
|
|
# The copyright notice above does not evidence any
|
|
# actual or intended publication of such source code.
|
|
#
|
|
|
|
function err_exit
|
|
{
|
|
print -u2 -n "\t"
|
|
print -u2 -r $Command: "$@"
|
|
let Errors+=1
|
|
}
|
|
|
|
integer Errors=0
|
|
Command=$0
|
|
OLDPWD=/bin
|
|
if [[ ~ != $HOME ]]
|
|
then err_exit '~' not $HOME
|
|
fi
|
|
x=~
|
|
if [[ $x != $HOME ]]
|
|
then err_exit x=~ not $HOME
|
|
fi
|
|
x=x:~
|
|
if [[ $x != x:$HOME ]]
|
|
then err_exit x=x:~ not x:$HOME
|
|
fi
|
|
if [[ ~+ != $PWD ]]
|
|
then err_exit '~' not $PWD
|
|
fi
|
|
x=~+
|
|
if [[ $x != $PWD ]]
|
|
then err_exit x=~+ not $PWD
|
|
fi
|
|
if [[ ~- != $OLDPWD ]]
|
|
then err_exit '~' not $PWD
|
|
fi
|
|
x=~-
|
|
if [[ $x != $OLDPWD ]]
|
|
then err_exit x=~- not $OLDPWD
|
|
fi
|
|
if [[ ~root != / ]]
|
|
then err_exit '~root' not /
|
|
fi
|
|
x=~root
|
|
if [[ $x != / ]]
|
|
then err_exit 'x=~root' not /
|
|
fi
|
|
x=~%%
|
|
if [[ $x != '~%%' ]]
|
|
then err_exit 'x='~%%' not '~%%
|
|
fi
|
|
exit $((Errors))
|