]> diplodocus.org Git - nmh/blobdiff - test/mhshow/test-msg-buffer-boundaries
Added start_test/finish_test to a bunch of tests.
[nmh] / test / mhshow / test-msg-buffer-boundaries
index 23b49348925abf86c6b51be2b1940ed548a7a887..fcd83dadabc0b6bbd115d96bb27fb2804b444a1b 100755 (executable)
@@ -21,6 +21,7 @@ expected="$MH_TEST_DIR/$$.expected"
 actual="$MH_TEST_DIR/$$.actual"
 
 # check a boundary condition in m_getfld():  its internal message
 actual="$MH_TEST_DIR/$$.actual"
 
 # check a boundary condition in m_getfld():  its internal message
+start_test "a boundary condition in m_getfld():  its internal message"
 # buffer holds exactly up to the end of a header field body in a
 # message part
 msgfile=`mhpath new`
 # buffer holds exactly up to the end of a header field body in a
 # message part
 msgfile=`mhpath new`
@@ -153,14 +154,16 @@ EOF
 
 # Write the expected output.
 cat >"$expected" <<EOF
 
 # Write the expected output.
 cat >"$expected" <<EOF
-part 1.1   text/plain                  29
+[ Message inbox:$msgnum ]
+[ part 1.1 - text/plain -   29B  ]
 This is the text/plain part.
 EOF
 
 This is the text/plain part.
 EOF
 
-mhshow -part 1.1 -form mhl.null -nopause $msgnum >"$actual" 2>&1
-check "$expected" "$actual"
+run_prog mhshow -part 1.1 -form mhl.null $msgnum >"$actual" 2>&1
+check "$expected" "$actual" : check number 1
 
 # check a boundary condition in m_getfld():  its internal message
 
 # check a boundary condition in m_getfld():  its internal message
+start_test "a boundary condition in m_getfld():  its internal message"
 # buffer holds exactly up to the end of a header field name in a
 # message part
 msgfile=`mhpath new`
 # buffer holds exactly up to the end of a header field name in a
 # message part
 msgfile=`mhpath new`
@@ -293,14 +296,16 @@ EOF
 
 # Write the expected output.
 cat >"$expected" <<EOF
 
 # Write the expected output.
 cat >"$expected" <<EOF
-part 1.1   text/plain                  29
+[ Message inbox:$msgnum ]
+[ part 1.1 - text/plain -   29B  ]
 This is the text/plain part.
 EOF
 
 This is the text/plain part.
 EOF
 
-mhshow -part 1.1 -form mhl.null -nopause $msgnum >"$actual" 2>&1
-check "$expected" "$actual"
+run_prog mhshow -part 1.1 -form mhl.null $msgnum >"$actual" 2>&1
+check "$expected" "$actual" : check number 2
 
 # check a boundary condition in m_getfld():  its internal message
 
 # check a boundary condition in m_getfld():  its internal message
+start_test "a boundary condition in m_getfld():  its internal message"
 # buffer holds exactly up to the end of a message part boundary
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
 # buffer holds exactly up to the end of a message part boundary
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
@@ -416,12 +421,14 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-The 8192nd character is the '2' at the end of the following NextPart_002.
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+
+The 8192'nd character is the '2' at the end of the following NextPart_002.
 
 --NextPart_002
 Content-Type: text/plain;
     charset="utf-8"
 
 --NextPart_002
 Content-Type: text/plain;
     charset="utf-8"
+Content-Description: the text/plain part
 
 This is the text/plain part.
 
 
 This is the text/plain part.
 
@@ -432,12 +439,14 @@ EOF
 
 # Write the expected output.
 cat >"$expected" <<EOF
 
 # Write the expected output.
 cat >"$expected" <<EOF
-part 1.1   text/plain                  29
+[ Message inbox:$msgnum ]
+[ part 1.1 - text/plain - the text/plain part  29B  ]
 This is the text/plain part.
 EOF
 
 This is the text/plain part.
 EOF
 
-mhshow -part 1.1 -form mhl.null -nopause $msgnum >"$actual" 2>&1
-check "$expected" "$actual"
+run_prog mhshow -part 1.1 -form mhl.null $msgnum >"$actual" 2>&1
+check "$expected" "$actual" : check number 3
 
 
 
 
+finish_test
 exit $failed
 exit $failed