From c70305e88b3d9cf01293e064b281f49a9bb96a46 Mon Sep 17 00:00:00 2001 From: John Denker Date: Fri, 23 Nov 2012 02:38:43 -0800 Subject: deal with more capitalization follies; now passes 'testall' (more than 4000 msgs, all OK) --- tools/libskrewt.c | 4 ++-- tools/testall | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/libskrewt.c b/tools/libskrewt.c index 37a9feb..39b241a 100644 --- a/tools/libskrewt.c +++ b/tools/libskrewt.c @@ -18,7 +18,7 @@ void parse_content(const string type_spec_line, } else { rest = get_type.substr(where+1); - get_type = get_type.substr(0,where); + get_type = toLower(get_type.substr(0,where)); } where = get_type.find("/"); if (where == string::npos){ @@ -31,7 +31,7 @@ void parse_content(const string type_spec_line, // now need to find boundary string srch = "boundary="; - where = rest.find(srch); + where = toLower(rest).find(srch); if (where != string::npos) { where += srch.length(); boundary = rest.substr(where); diff --git a/tools/testall b/tools/testall index e97d853..27b912b 100755 --- a/tools/testall +++ b/tools/testall @@ -1,7 +1,9 @@ #! /bin/bash +i=0 for file in /home/jsd/Maildir/cur/* ; do - echo "**** $file" + ((ii++)) + echo "**** $ii $file" <$file ./ward -err >/tmp/testall.eml && diff $file /tmp/testall.eml || exit 1 done echo OK -- cgit v1.2.3