ossp-pkg/lmtp2nntp/test/run.sh 1.4 -> 1.5
--- run.sh 2001/08/14 11:26:43 1.4
+++ run.sh 2001/08/14 14:42:41 1.5
@@ -1,26 +1,65 @@
#/bin/sh
-if [ -e /tmp/tracing ]
-then
- ssh -t -x root@localhost exec rm -f /tmp/t
-fi
+before ()
+{
+ if [ -e /tmp/tracing ]
+ then
+ ssh -t -x root@localhost exec rm -f /tmp/tracing
+ fi
+ touch /tmp/tracing
+}
+
+post1000 ()
+{
+ for h in 0 1 2 3 4 5 6 7 8 9
+ do
+ for z in 0 1 2 3 4 5 6 7 8 9
+ do
+ for e in 0 1 2 3 4 5 6 7 8 9
+ do
+ echo -n $h$z$e
+ awk <testmessage.viasendmail "\
+ /^#$/ { print \"$h$z$e\" } \
+ /Message-ID/ { print \"Message-ID: <`date +%Y%m%d%H%M%S`-$h$z$e@dev12.dev.de.cw.net>\" } \
+ !/Message-ID/ { print \$0 } \
+ " \
+ | sendmail -i posting+$h$z$e@dev12.dev.de.cw.net
+ done
+ done
+ done
+}
+
+postdup ()
+{
+ echo -----------------------------------------------------------
#./lmtp2nntp -h news-muc1.de.cw.net -h news-ffm2.de.cw.net -h news-dus2.de.cw.net -h news-ecrc.de
#clear ; ./lmtp2nntp <testmessage2 -g envelope -h dev16
#exit
-clear
-echo ------------------------------------------------------------
-awk <testmessage2 "\
- /Message-ID/ { print \"Message-ID: <`date +%Y%m%d%H%M%S`@dev12.dev.de.cw.net>\" } \
- !/Message-ID/ { print \$0 } \
- " \
- | tee /tmp/reusetestmessage \
- | ./lmtp2nntp -g envelope -h dev16
-cat /tmp/reusetestmessage | ./lmtp2nntp -t /tmp/tracing -g envelope -h dev16
-echo -----------------------------------------------------------
-exit
-
-if [ -r /tmp/tracing ]
-then
- cat /tmp/tracing
-fi
+ awk <testmessage.viasendmail "\
+ /Message-ID/ { print \"Message-ID: <`date +%Y%m%d%H%M%S`@dev12.dev.de.cw.net>\" } \
+ !/Message-ID/ { print \$0 } \
+ " \
+ >/tmp/testmessage
+ echo -----------------------------------------------------------
+ cat /tmp/testmessage \
+ | sendmail -i posting+x@dev12.dev.de.cw.net
+ echo -----------------------------------------------------------
+ cat /tmp/testmessage \
+ | sendmail -i posting+x@dev12.dev.de.cw.net
+ echo -----------------------------------------------------------
+}
+
+after ()
+{
+ if [ -r /tmp/tracing ]
+ then
+ echo tail -f /tmp/tracing
+ tail -f /tmp/tracing
+ fi
+}
+
+before
+post1000
+after
+exit 0
|
|