#!/bin/sh
# This regression test is a part of SIPp.
# A ~user/ path of a user there is not warns in one line, without an
# errno, as it has none.
. "`dirname "$0"`/../functions"; init

rm -f err.log
sippfg -sf uac.xml -i 127.0.0.1 -p 26541 -m 1 127.0.0.1:26540 \
    -trace_err -error_file err.log >/dev/null 2>&1
warned=`grep -c 'Unable to resolve home path for \[~nosuchuserx/a.raw\]$' err.log`
errno=`grep -c 'errno = 0' err.log`
rm -f err.log

if test "${warned:-0}" -eq 0; then
    fail "no warning of the unknown user"
elif test "${errno:-0}" -ne 0; then
    fail "the warning has errno 0"
else
    ok
fi
