Index: ossp-pkg/lmtp2nntp/test.sh RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/test.sh,v rcsdiff -q -kk '-r1.16' '-r1.17' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/test.sh,v' 2>/dev/null --- test.sh 2003/02/06 14:17:56 1.16 +++ test.sh 2003/02/06 15:29:55 1.17 @@ -86,7 +86,6 @@ STDIN="${PREFIX}stdin" STDOUT="${PREFIX}stdout" STDERR="${PREFIX}stderr" - LOCAL="0.0.0.0" HOST="0.0.0.0" GROUP="my.test" MFILT=".+@(?:[^.]+\.)*example\.com" @@ -160,7 +159,7 @@ echon "checking whether a valid fake posting succeeds ... " prolog newmsg -./lmtp2nntp <${STDIN} -b - -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 --timeoutnntpconnect=1 ${GROUP} >${STDOUT} 2>${STDERR} ; RC=$ +./lmtp2nntp <${STDIN} -b - -o 250/2.0.0 -g arg -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 --timeoutnntpconnect=1 ${GROUP} >${STDOUT} 2>${STDERR} ; RC=$ RC=""; if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready' | wc -l` ]; then RC="${RC}init "; fi if [ 1 -eq `egrep <${STDOUT} '^250[- ].*pleased to meet you' | wc -l` ]; then RC="${RC}LHLO "; fi @@ -182,7 +181,7 @@ echon "checking whether -m option blocks invalid sender ... " prolog newmsg -( MFILT=".*@is.invalid" ; ./lmtp2nntp <${STDIN} -b - -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 --timeoutnntpconnect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$? +( MFILT=".*@is.invalid" ; ./lmtp2nntp <${STDIN} -b - -o 250/2.0.0 -g arg -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 --timeoutnntpconnect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$? RC=""; if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready' | wc -l` ]; then RC="${RC}init "; fi if [ 1 -eq `egrep <${STDOUT} '^250[- ].+pleased to meet you' | wc -l` ]; then RC="${RC}LHLO "; fi @@ -204,7 +203,7 @@ echon "checking whether -s option rejects article with invalid size ... " prolog newmsg -./lmtp2nntp <${STDIN} -b - -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 100 --timeoutnntpconnect=1 ${GROUP} >${STDOUT} 2>${STDERR} ; RC=$? +./lmtp2nntp <${STDIN} -b - -o 250/2.0.0 -g arg -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 100 --timeoutnntpconnect=1 ${GROUP} >${STDOUT} 2>${STDERR} ; RC=$? RC=""; if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready' | wc -l` ]; then RC="${RC}init "; fi if [ 1 -eq `egrep <${STDOUT} '^250[- ].*pleased to meet you' | wc -l` ]; then RC="${RC}LHLO "; fi @@ -243,7 +242,7 @@ echon "checking whether -g envelope option blocks invalid group ... " prolog newmsg -( GROUP="foo.*" ; ./lmtp2nntp <${STDIN} -b - -c ${LOCAL} -o 250/2.0.0 -g envelope -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 --timeoutnntpconnect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$? +( GROUP="foo.*" ; ./lmtp2nntp <${STDIN} -b - -o 250/2.0.0 -g envelope -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 --timeoutnntpconnect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$? RC=""; if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready' | wc -l` ]; then RC="${RC}init "; fi if [ 1 -eq `egrep <${STDOUT} '^250[- ].*pleased to meet you' | wc -l` ]; then RC="${RC}LHLO "; fi @@ -266,7 +265,7 @@ echon "checking whether -d option times out for invalid host ... " prolog newmsg -( HOST="10.255.255.255" ; ./lmtp2nntp <${STDIN} -b - -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 --timeoutnntpconnect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$? +( HOST="10.255.255.255" ; ./lmtp2nntp <${STDIN} -b - -o 250/2.0.0 -g arg -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 --timeoutnntpconnect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$? RC=""; if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready' | wc -l` ]; then RC="${RC}init "; fi if [ 1 -eq `egrep <${L2FILE} 'warning.+connect.+failed' | wc -l` ]; then RC="${RC}conn "; fi @@ -283,7 +282,7 @@ echon "checking whether -h option adds header/value pair ... " prolog newmsg -./lmtp2nntp <${STDIN} -b - -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} -h "::X-Gateway:added it!" ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 --timeoutnntpconnect=1 ${GROUP} >${STDOUT} 2>${STDERR} +./lmtp2nntp <${STDIN} -b - -o 250/2.0.0 -g arg -d ${HOST} -h "::X-Gateway:added it!" ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 --timeoutnntpconnect=1 ${GROUP} >${STDOUT} 2>${STDERR} RC=""; if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready' | wc -l` ]; then RC="${RC}init "; fi if [ 1 -eq `egrep <${L2FILE} 'appending header X-Gateway:' | wc -l` ]; then RC="${RC}head "; fi @@ -302,7 +301,7 @@ echon "checking whether -r option rejects headers ... " prolog newmsg -./lmtp2nntp <${STDIN} -b - -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} -r'^X-Linefoldingtest:.*begun.$' ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 --timeoutnntpconnect=1 ${GROUP} >${STDOUT} 2>${STDERR} +./lmtp2nntp <${STDIN} -b - -o 250/2.0.0 -g arg -d ${HOST} -r'^X-Linefoldingtest:.*begun.$' ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 --timeoutnntpconnect=1 ${GROUP} >${STDOUT} 2>${STDERR} RC=""; if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready' | wc -l` ]; then RC="${RC}init "; fi if [ 1 -eq `egrep <${L2FILE} 'restricted header found' | wc -l` ]; then RC="${RC}rest "; fi