diff options
author | John Denker <jsd@av8n.com> | 2012-11-23 02:19:53 -0800 |
---|---|---|
committer | John Denker <jsd@av8n.com> | 2012-11-23 02:19:53 -0800 |
commit | 0dfd3cabf1e7e2bd8d0db7b4588e05af54ce4c05 (patch) | |
tree | f774ac8915d0a8a93bb5f6b3cb828be83ae78b94 | |
parent | abc922f8a3f40b5f011cffe5cbe06e2c2df90d02 (diff) |
working rather well;
now using 'testall' to test it against thousands of msgs
-rw-r--r-- | tools/libskrewt.c | 3 | ||||
-rwxr-xr-x | tools/testall | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/tools/libskrewt.c b/tools/libskrewt.c index 595c3fe..37a9feb 100644 --- a/tools/libskrewt.c +++ b/tools/libskrewt.c @@ -52,6 +52,7 @@ void parse_content(const string type_spec_line, } int skrewt::krunch_rfrom(){ + if (received_from == "") return 0; // probably a bounce message, no rfrom stringstream parse; parse.str(received_from); string word; @@ -62,7 +63,7 @@ int skrewt::krunch_rfrom(){ return ex_syserr; } parse >> proximta_rDNS; - for (;;) { + for (;;) { // loop over words in this record parse >> word; size_t len = word.length(); if (len < 2) { diff --git a/tools/testall b/tools/testall new file mode 100755 index 0000000..e97d853 --- /dev/null +++ b/tools/testall @@ -0,0 +1,7 @@ +#! /bin/bash + +for file in /home/jsd/Maildir/cur/* ; do + echo "**** $file" + <$file ./ward -err >/tmp/testall.eml && diff $file /tmp/testall.eml || exit 1 +done +echo OK |