This is message number $i
!
done
+folder +inbox >/dev/null
# now run the test
set +e
actual=$MH_TEST_DIR/$$.actual
# Write message with bogus header field (missing blank line, really).
-msgfile=$(mhpath new)
+msgfile=$(mhpath b)
msgnum=$(basename $msgfile)
cat > $msgfile <<EOF
Date: Sun, 18 Dec 2005 00:52:39 +0100
# check scan
cat > $expected <<EOF
- 11 12/18 foo@example.edu test<<This is a multi-part message in MIME forma
+ 11 2005-12-18 00:52 foo@example.edu test
EOF
scan $msgnum > $actual 2>&1
check
-# check show (mhl)
-cat > $expected <<EOF
-(Message inbox:11)
-
-Date: Sun, 18 Dec 2005 00:52:39 +0100
-To: bar@example.edu
-From: foo@example.edu
-Subject: test
-
-
-This is a multi-part message in MIME format.
-
-I am a stupid spammer.
-EOF
-show $msgnum > $actual 2>&1
-check
-
-# check mhshow
+# check show
cat > $expected <<EOF
Date: Sun, 18 Dec 2005 00:52:39 +0100
-To: bar@example.edu
From: foo@example.edu
+To: bar@example.edu
Subject: test
-
part text/plain 70
This is a multi-part message in MIME format.
I am a stupid spammer.
EOF
-mhshow $msgnum > $actual 2>&1
+show $msgnum > $actual 2>&1
check
exit $failed
######################################################
output=`folder -total +inbox`
-if test x"$output" != x'TOTAL = 10 messages in 1 folder.' ; then
+if test x"$output" != x'TOTAL = 10 messages in 1 folder' ; then
exit 1
fi
EOF
expected=$MH_TEST_DIR/$$.expected
-actual=$MH_TEST_DIR/Mail/draft
+actual=$MH_TEST_DIR/Mail/drafts/1
cat > $expected <<EOF
X-STRING: 0 found
X-NOSTRING: 3x missing
X-NONUMBER: 3x no
--------
-Test1 writes:
> This is message number 1
EOF
-repl -editor true -format -form $form -group -nocc me -nowhatnowproc 1
+repl -editor true -form $form -group -nocc me -whatnowproc true 1
diff -u $expected $actual
actual=$MH_TEST_DIR/$$.actual
cat > $expected <<EOF
- 1 09/29 Test1 Testing message 1<<This is message number 1 >>
- 2 09/29 Test2 Testing message 2<<This is message number 2 >>
- 3 09/29 Test3 Testing message 3<<This is message number 3 >>
- 4 09/29 Test4 Testing message 4<<This is message number 4 >>
- 5 09/29 Test5 Testing message 5<<This is message number 5 >>
- 6 09/29 Test6 Testing message 6<<This is message number 6 >>
- 7 09/29 Test7 Testing message 7<<This is message number 7 >>
- 8 09/29 Test8 Testing message 8<<This is message number 8 >>
- 9 09/29 Test9 Testing message 9<<This is message number 9 >>
- 10 09/29 Test10 Testing message 10<<This is message number 10 >>
+ 1 2006-09-29 00:00 Test1 Testing message 1
+ 2 2006-09-29 00:00 Test2 Testing message 2
+ 3 2006-09-29 00:00 Test3 Testing message 3
+ 4 2006-09-29 00:00 Test4 Testing message 4
+ 5 2006-09-29 00:00 Test5 Testing message 5
+ 6 2006-09-29 00:00 Test6 Testing message 6
+ 7 2006-09-29 00:00 Test7 Testing message 7
+ 8 2006-09-29 00:00 Test8 Testing message 8
+ 9 2006-09-29 00:00 Test9 Testing message 9
+ 10 2006-09-29 00:00 Test10 Testing message 10
EOF
scan -width 80 +inbox > $actual
actual=$MH_TEST_DIR/$$.actual
# Write message with Content-Transfer-Encoding: binary text.
-msgfile=$(mhpath new)
+msgfile=$(mhpath b)
msgnum=$(basename $msgfile)
cat > $msgfile <<EOF
Content-Transfer-Encoding: binary
# check it
cat > $expected <<EOF
-Date: Tue, 05 Mar 2002 18:20:35 GMT
-To: bar@example.edu
+Date: Tue, 05 Mar 2002 18:20:35 +0000
From: foo@example.edu
+To: bar@example.edu
Subject: test
-MIME-Version: 1.0
-Content-Disposition: inline
-
part text/plain 34
This is a test; this is the body.
EOF
-mhshow $msgnum > $actual 2>&1
+show $msgnum > $actual 2>&1
diff -u $expected $actual
actual=$MH_TEST_DIR/$$.actual
# Write message with bogus quoted-printable data.
-msgfile=$(mhpath new)
+msgfile=$(mhpath b)
msgnum=$(basename $msgfile)
cat > $msgfile <<EOF
From: foo@example.edu
# check it
cat > $expected <<EOF
Date: Sun, 18 Dec 2005 00:52:39 +0100
-To: bar@example.edu
From: foo@example.edu
+To: bar@example.edu
Subject: test
-MIME-Version: 1.0
-
part text/plain 181
=
=
=l
=\b ^H (backspace) character, probably erased = in diff output
EOF
-mhshow $msgnum > $actual 2>&1
+show $msgnum > $actual 2>&1
diff -u $expected $actual
rm -f "baz's boz"
touch "baz's boz"
# whatnow's attach stuff needs a draft to work on
-cp "$MH_TEST_DIR/Mail/inbox/1" "$MH_TEST_DIR/Mail/draft"
+# cp "$MH_TEST_DIR/Mail/inbox/1" "$MH_TEST_DIR/Mail/draft"
+comp +inbox 1 -whatnow true
expectederr=$MH_TEST_DIR/$$.expectederr
actualerr=$MH_TEST_DIR/$$.actualerr
# whatnow's exit status is always 1 so that is not a failure
set +e
-echo "attach baz\\'s\\ boz" | whatnow -attach foo -noedit -prompt '' 2>> $actualerr >> $actual
-echo "alist" | whatnow -attach foo -noedit -prompt '' 2>> $actualerr >> $actual
-echo "detach baz\\'s\\ boz" | whatnow -attach foo -noedit -prompt '' 2>> $actualerr >> $actual
-echo "alist" | whatnow -attach foo -noedit -prompt '' 2>> $actualerr >> $actual
+echo "attach baz\\'s\\ boz" | whatnow -editor true -prompt '' 2>> $actualerr >> $actual
+echo "alist" | whatnow -editor true -prompt '' 2>> $actualerr >> $actual
+echo "detach baz\\'s\\ boz" | whatnow -editor true -prompt '' 2>> $actualerr >> $actual
+echo "alist" | whatnow -editor true -prompt '' 2>> $actualerr >> $actual
set -e
diff -u $expectederr $actualerr
cat > $expectederr <<EOF
EOF
+# create a draft message
+comp -whatnow true
+
# ||true to ignore whatnow's exit status
# watch the quoting -- shell and printf and then the shell run inside whatnow
-printf "cd $MH_TEST_DIR/foo\\\\'s\\\\ bar\npwd\n" | whatnow -noedit -prompt '' 2> "$actualerr" > "$actual" || true
+printf "cd $MH_TEST_DIR/foo\\\\'s\\\\ bar\npwd\n" | whatnow -prompt '' 2> "$actualerr" > "$actual" || true
diff -u $expectederr $actualerr
diff -u $expected $actual
cat > $expectederr <<EOF
EOF
+# create a draft message
+comp -whatnow true
+
# NB use of sort as the order of output of ls is not guaranteed
-echo 'ls' | whatnow -noedit -prompt '' 2> "$actualerr" | sort > "$actual"
+echo 'ls' | whatnow -prompt '' 2> "$actualerr" | sort > "$actual"
diff -u $expectederr $actualerr
diff -u $expected $actual