########################################################################
# #
# This software is part of the ast package #
# Copyright (c) 1982-2012 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
if $SHELL -c '[[ ~root == /* ]]'
then x=$(print -r -- ~root)
fi
{
set -o noglob
print -r -- "$6"
else print .
fi
}
if [[ ~ != $HOME ]]
fi
x=~
if [[ $x != $HOME ]]
fi
x=x:~
if [[ $x != x:$HOME ]]
fi
if [[ ~+ != $PWD ]]
fi
x=~+
if [[ $x != $PWD ]]
fi
if [[ ~- != $OLDPWD ]]
fi
x=~-
if [[ $x != $OLDPWD ]]
fi
do h=$(home $u)
if [[ $h != . ]]
x=~$u
[[ $x -ef $h ]] || x="~$u not $h"
break
fi
done
x=~g.r.emlin
if [[ $x != '~g.r.emlin' ]]
fi
x=~:~
fi
HOME=/
[[ ~ == / ]] || err_exit '~ should be /'
nl=$'\n'
[[ $($tmp/tilde foo) == "$PWD$nl$PWD" ]] 2> /dev/null || err_exit 'tilde fails inside a script run by name'