]> diplodocus.org Git - nmh/log
nmh
9 years agoRename recently added TrimSuffixC() to trim_suffix_c().
Ralph Corderoy [Sat, 10 Dec 2016 14:43:59 +0000 (14:43 +0000)]
Rename recently added TrimSuffixC() to trim_suffix_c().

9 years agoRename recently added HasSuffixC() to has_suffix_c().
Ralph Corderoy [Sat, 10 Dec 2016 14:42:47 +0000 (14:42 +0000)]
Rename recently added HasSuffixC() to has_suffix_c().

9 years agoRename recently added HasSuffix() to has_suffix().
Ralph Corderoy [Sat, 10 Dec 2016 14:39:21 +0000 (14:39 +0000)]
Rename recently added HasSuffix() to has_suffix().

9 years agoRename recently added HasPrefix() to has_prefix().
Ralph Corderoy [Sat, 10 Dec 2016 14:36:43 +0000 (14:36 +0000)]
Rename recently added HasPrefix() to has_prefix().

Sticking with local convention, as Ken requested.

9 years agoTest if the buildbots care about tools/showbuildenv's exit status.
Ralph Corderoy [Sat, 10 Dec 2016 14:24:27 +0000 (14:24 +0000)]
Test if the buildbots care about tools/showbuildenv's exit status.

9 years agoDocument that adios() does not return. abort() ensures it won't.
Ralph Corderoy [Sat, 10 Dec 2016 14:19:43 +0000 (14:19 +0000)]
Document that adios() does not return.  abort() ensures it won't.

Discussion with David confirmed that adios()'s de facto contract with
the caller is that it won't return.  Document that, and add an abort(3)
to ensure it won't occur.  Better that than return and blunder on until
a SEGV or corruption later.

9 years agomhlsbr.c: Don't hide mhladios and mhldone behind macros.
Ralph Corderoy [Sat, 10 Dec 2016 14:11:13 +0000 (14:11 +0000)]
mhlsbr.c: Don't hide mhladios and mhldone behind macros.

Locally defined mhladios() and mhldone() were called as adios() and
done() thanks to #defines that hid the widely-used functions with those
names.  Don't bother as it confuses the reader.  Just call the local
variations directly to make clear it's not the standard implementation.

9 years agoGeneralized condition for support of parameter value tests.
David Levine [Fri, 9 Dec 2016 14:34:59 +0000 (09:34 -0500)]
Generalized condition for support of parameter value tests.

9 years agoOne last fix to test-charset.
David Levine [Fri, 9 Dec 2016 02:04:52 +0000 (21:04 -0500)]
One last fix to test-charset.

9 years agoFixed condition to enable skipping parameter value tests.
David Levine [Fri, 9 Dec 2016 01:53:36 +0000 (20:53 -0500)]
Fixed condition to enable skipping parameter value tests.

9 years agoAnd skip the other parameter value test on the FreeBSD10 buildbot.
David Levine [Fri, 9 Dec 2016 01:45:57 +0000 (20:45 -0500)]
And skip the other parameter value test on the FreeBSD10 buildbot.

9 years agoThat didnt work, so skip Encoded parameter value test on that buildbot.
David Levine [Fri, 9 Dec 2016 01:18:14 +0000 (20:18 -0500)]
That didnt work, so skip Encoded parameter value test on that buildbot.

9 years agoUse locale that the FreeBSD10 buildbot has.
David Levine [Fri, 9 Dec 2016 01:03:28 +0000 (20:03 -0500)]
Use locale that the FreeBSD10 buildbot has.

It has EBCDIC-UK but not EBCDIC-US.

9 years agoAdded temporary debug code.
David Levine [Fri, 9 Dec 2016 00:51:25 +0000 (19:51 -0500)]
Added temporary debug code.

9 years agoTry to fix Encoded parameter value test on FreeBSD10 buildbot.
David Levine [Fri, 9 Dec 2016 00:37:40 +0000 (19:37 -0500)]
Try to fix Encoded parameter value test on FreeBSD10 buildbot.

9 years agoReplaced !iscntrl() with isprint().
David Levine [Thu, 8 Dec 2016 21:27:40 +0000 (16:27 -0500)]
Replaced !iscntrl() with isprint().

To address Ralph's FIXME comment.  One example where a byte would
have been printed with !iscntrl() is 0x24 is ISO 646 BASIC (Inv),
which is undefined.  Also, added test cases to cover most of
get_param_value().  Also, replaced a couple of other FIXME's with
code comments.

9 years agoFixed and restored commit 9a4b4a3d3b27fe4a7ff6d0b8724ce1c06b5917eb.
David Levine [Mon, 5 Dec 2016 16:50:40 +0000 (11:50 -0500)]
Fixed and restored commit 9a4b4a3d3b27fe4a7ff6d0b8724ce1c06b5917eb.

Using AC_CHECK_MEMBERS instead of AC_CHECK_MEMBER.  I don't know why
the former works but the latter doesn't.

9 years agoReverted commit 9a4b4a3d3b27fe4a7ff6d0b8724ce1c06b5917eb.
David Levine [Sun, 4 Dec 2016 22:13:09 +0000 (17:13 -0500)]
Reverted commit 9a4b4a3d3b27fe4a7ff6d0b8724ce1c06b5917eb.

It broke the build on the FreeBSD 10 buildbot, not sure why.

9 years agoEnabled detection of tm_gmtoff on _GNU_SOURCE platforms, e.g., Linux.
David Levine [Sun, 4 Dec 2016 22:02:13 +0000 (17:02 -0500)]
Enabled detection of tm_gmtoff on _GNU_SOURCE platforms, e.g., Linux.

By temporarily adding $AM_CPPFLAGS to CPPFLAGS.

9 years agoAdded filename completion to bash_completion_nmh.
David Levine [Sat, 3 Dec 2016 17:03:53 +0000 (12:03 -0500)]
Added filename completion to bash_completion_nmh.

9 years agoClose temp file.
David Levine [Fri, 25 Nov 2016 14:02:08 +0000 (09:02 -0500)]
Close temp file.

9 years agoAdded flex 2.6.0 (with Fedora 25) output fixup.
David Levine [Wed, 23 Nov 2016 15:05:38 +0000 (10:05 -0500)]
Added flex 2.6.0 (with Fedora 25) output fixup.

9 years agoOpen infile before fixing each message.
David Levine [Sun, 20 Nov 2016 19:25:11 +0000 (14:25 -0500)]
Open infile before fixing each message.

Though the input file won't need to be opened if everything goes
well, do it early just in case there's a failure, and that failure
is running out of file descriptors.

9 years agoFix nmh man page so it shows correct name of profile.
Larry Hynes [Sun, 20 Nov 2016 15:32:40 +0000 (10:32 -0500)]
Fix nmh man page so it shows correct name of profile.

9 years agomhstoresbr.c: Factor MIME-parameter-can-be-used-for-filename test.
Ralph Corderoy [Mon, 14 Nov 2016 00:14:31 +0000 (00:14 +0000)]
mhstoresbr.c: Factor MIME-parameter-can-be-used-for-filename test.

It was several lines repeated each time, and it saves having to check
they're all identical.  The original test pressed on if the MIME
parameter's value was an empty string;  preserve that as it's spotted
later on.

9 years agoSplit a few more if-then statements into two lines to help gcov.
Ralph Corderoy [Sun, 13 Nov 2016 23:05:37 +0000 (23:05 +0000)]
Split a few more if-then statements into two lines to help gcov.

It's interesting to see how often some of them have the then-branch
taken.

9 years agoOpen outfile before parsing message(s).
David Levine [Sat, 19 Nov 2016 15:37:06 +0000 (10:37 -0500)]
Open outfile before parsing message(s).

So that we don't have to risk opening it after running out of fds.

9 years agoAdded application/ics entries, and "file was generated" comment.
David Levine [Sat, 19 Nov 2016 15:28:08 +0000 (10:28 -0500)]
Added application/ics entries, and "file was generated" comment.

application/ics is odd but does appear in the wild, and sometimes
without a corresponding text/calendar part.

9 years agoAdded mhshow-suffix-text entry.
David Levine [Sat, 19 Nov 2016 15:24:43 +0000 (10:24 -0500)]
Added mhshow-suffix-text entry.

I don't know why it wasn't there already, it's in the mhshow
man page.

9 years agoTweaked to work with Heirloom shell.
David Levine [Mon, 14 Nov 2016 00:40:53 +0000 (19:40 -0500)]
Tweaked to work with Heirloom shell.

9 years agoRemoved bash-ism "function" declaration.
David Levine [Sun, 13 Nov 2016 22:56:44 +0000 (17:56 -0500)]
Removed bash-ism "function" declaration.

9 years agoReplaced docs/COMPLETION-BASH with etc/bash_completions_nmh.
David Levine [Sun, 13 Nov 2016 19:50:08 +0000 (14:50 -0500)]
Replaced docs/COMPLETION-BASH with etc/bash_completions_nmh.

It's generated from man/mh-chart.man, which in turn is generated.
Automake doesn't like generated files in docs, hence the move to
etc.  And the new filename better fits usage, I think.

Did not provide support for completing message numbers.  It can
be fooled by programs that take multiple switches with +
arguments.

COMPLETION-BASH was broken with current bash, anyway.

Also, removed sbr/sigmsg.h from CLEANFILES in Makefile.am.  It
was a leftover from commit 5776f9b783afe8e6bdbe430adb5d5b9435d25b19.

9 years agoAdded copyright noticed.
David Levine [Sun, 13 Nov 2016 14:39:01 +0000 (09:39 -0500)]
Added copyright noticed.

9 years agoRemoved unused declaration of output_message().
David Levine [Sun, 13 Nov 2016 14:38:24 +0000 (09:38 -0500)]
Removed unused declaration of output_message().

9 years agoReplace many add(s, NULL) with mh_xstrdup(s).
Ralph Corderoy [Sun, 13 Nov 2016 01:05:09 +0000 (01:05 +0000)]
Replace many add(s, NULL) with mh_xstrdup(s).

Where s is known to be non-NULL.

9 years agoReplace some add(FIELD, NULL) with mh_xstrdup(FIELD).
Ralph Corderoy [Sat, 12 Nov 2016 18:48:20 +0000 (18:48 +0000)]
Replace some add(FIELD, NULL) with mh_xstrdup(FIELD).

The various FIELD are macros for string constants so can not be NULL.

9 years agom_getfld: Shuffle `delim' assignments slightly.
Ralph Corderoy [Sat, 12 Nov 2016 18:40:46 +0000 (18:40 +0000)]
m_getfld: Shuffle `delim' assignments slightly.

Document end state of the four pointers to parts of the delimiter.
fdelimlen can be, wrongly, one less without causing problems because a
second check uses edelimlen.  The only side effect is an extra iteration
through m_getfld().

9 years agoRevert "m_getfld: Shorten fdelimlen by one; it was too long."
Ralph Corderoy [Sat, 12 Nov 2016 15:35:35 +0000 (15:35 +0000)]
Revert "m_getfld: Shorten fdelimlen by one;  it was too long."

This reverts commit 36a12f6a1a5a57799e48b23fd5ae47fe2351be68.

I think it was right after all, but currently trying to get a test to
fail with the faulty change.

9 years agoReplace copy(s, d) with POSIX-1.2008's stpcpy(d, s).
Ralph Corderoy [Sat, 12 Nov 2016 00:55:17 +0000 (00:55 +0000)]
Replace copy(s, d) with POSIX-1.2008's stpcpy(d, s).

9 years agom_getfld: Replace matchc() with memmem(3).
Ralph Corderoy [Sat, 12 Nov 2016 00:39:23 +0000 (00:39 +0000)]
m_getfld: Replace matchc() with memmem(3).

libc is more likely to find one lump of memory inside another quicker
than a home-grown quadratic emulation of the VAX's MATCHC instruction.
memmem() isn't POSIX, but exists on Linux and FreeBSD.  This will see if
the buildbot is happy.

9 years agom_getfld: Remove never-true test in matchc().
Ralph Corderoy [Sat, 12 Nov 2016 00:31:36 +0000 (00:31 +0000)]
m_getfld: Remove never-true test in matchc().

Now the fdelimlen doesn't include the NUL it is never true.  I didn't
understand how it could ever be true but gcov on the test suite was
showing 22e6 tests had three positives;  that's what put me on to
fdelimlen's overshoot.

9 years agom_getfld: Shorten fdelimlen by one; it was too long.
Ralph Corderoy [Fri, 11 Nov 2016 23:23:11 +0000 (23:23 +0000)]
m_getfld: Shorten fdelimlen by one;  it was too long.

The fdelimlen bytes starting at fdelim included a NUL at the end, e.g. 7
for "\nFrom \0".  Other code seems not to expect this and has
conditional bits to work around it, perhaps without understanding why.
All the tests still pass, including with valgrind.

9 years agoconfigure.ac: Add FIXME regarding _BSD_SOURCE for tm.tm_gmtoff test.
Ralph Corderoy [Fri, 11 Nov 2016 21:25:39 +0000 (21:25 +0000)]
configure.ac: Add FIXME regarding _BSD_SOURCE for tm.tm_gmtoff test.

9 years agodlocaltime(): Only call tzset(3) once.
Ralph Corderoy [Fri, 11 Nov 2016 00:38:29 +0000 (00:38 +0000)]
dlocaltime(): Only call tzset(3) once.

This avoids the stat(2) of /etc/localtime per message scan if TZ isn't
set in the environment;  that's the default case on this Linux system.
I can't see a way the TZ environment variable is likely to change
between messages, or that it's intended an invocation of scan(1), say,
copes with the timezone shifting underneath it by /etc/localtime being
changed.

9 years agouip/scansbr.c: Use fputs(3) instead of mh_fputs().
Ralph Corderoy [Thu, 10 Nov 2016 22:44:59 +0000 (22:44 +0000)]
uip/scansbr.c: Use fputs(3) instead of mh_fputs().

I can't see any reason a local one exists.  It loops, calling putc(3).
The stdlib has the opportunity to be more efficient.

9 years agoAdd test-forw-coverage to improve uip/forw.c's coverage.
Ralph Corderoy [Thu, 10 Nov 2016 21:39:40 +0000 (21:39 +0000)]
Add test-forw-coverage to improve uip/forw.c's coverage.

9 years agotest-mhl-flags: Improve coverage of uip/mhlsbr.c.
Ralph Corderoy [Wed, 9 Nov 2016 04:50:01 +0000 (04:50 +0000)]
test-mhl-flags: Improve coverage of uip/mhlsbr.c.

9 years agotest-fmtdump: Increase uip/fmtdump.c coverage.
Ralph Corderoy [Wed, 9 Nov 2016 03:02:02 +0000 (03:02 +0000)]
test-fmtdump: Increase uip/fmtdump.c coverage.

9 years agotest-flist: Increase coverage on argv[] processing.
Ralph Corderoy [Tue, 8 Nov 2016 23:55:13 +0000 (23:55 +0000)]
test-flist: Increase coverage on argv[] processing.

9 years agoAdd test/format/test-ap to get 100% uip/ap.c coverage.
Ralph Corderoy [Tue, 8 Nov 2016 23:32:23 +0000 (23:32 +0000)]
Add test/format/test-ap to get 100% uip/ap.c coverage.

9 years agouip/dp.c: Increase coverage to 100%.
Ralph Corderoy [Thu, 3 Nov 2016 10:23:31 +0000 (10:23 +0000)]
uip/dp.c: Increase coverage to 100%.

9 years agoReplaced add(s, NULL) with mh_xstrdup(s).
David Levine [Tue, 8 Nov 2016 13:25:50 +0000 (08:25 -0500)]
Replaced add(s, NULL) with mh_xstrdup(s).

9 years agoRemoved unused global from MIME parser.
David Levine [Tue, 8 Nov 2016 13:16:24 +0000 (08:16 -0500)]
Removed unused global from MIME parser.

9 years agoInitialize mhparse global for each message.
David Levine [Tue, 8 Nov 2016 02:01:31 +0000 (21:01 -0500)]
Initialize mhparse global for each message.

Globals are evil.  It's tricky to test, so no test was added.
Just cleaned up test-mhfixmsg.

9 years agoForgot to commit test-mhbuild. And thank Tom Lane for reporting bug.
David Levine [Mon, 7 Nov 2016 21:43:01 +0000 (16:43 -0500)]
Forgot to commit test-mhbuild.  And thank Tom Lane for reporting bug.

Update to commit 6c359ae82651d117af71c55ce1e56f3c5db18bfe.

9 years agoDon't parse parse # lines with mhbuild -nodirectives.
David Levine [Mon, 7 Nov 2016 21:28:14 +0000 (16:28 -0500)]
Don't parse parse # lines with mhbuild -nodirectives.

9 years agoPlugged remaining mhfixmsg(1) memory leaks.
David Levine [Sun, 6 Nov 2016 22:41:01 +0000 (17:41 -0500)]
Plugged remaining mhfixmsg(1) memory leaks.

9 years agoMade static char strings const.
David Levine [Sun, 6 Nov 2016 22:39:13 +0000 (17:39 -0500)]
Made static char strings const.

9 years agoPlug memory leak with parameter continuations.
David Levine [Sun, 6 Nov 2016 21:48:40 +0000 (16:48 -0500)]
Plug memory leak with parameter continuations.

9 years agoFree c_ctparams for all content types, not just text.
David Levine [Sun, 6 Nov 2016 21:46:42 +0000 (16:46 -0500)]
Free c_ctparams for all content types, not just text.

9 years agouip/ap, uip/dp: Remove unneeded char **arguments.
Ralph Corderoy [Thu, 3 Nov 2016 10:41:50 +0000 (10:41 +0000)]
uip/ap, uip/dp: Remove unneeded char **arguments.

9 years agodp: Fix write past end of dates[] array.
Ralph Corderoy [Wed, 2 Nov 2016 23:25:14 +0000 (23:25 +0000)]
dp: Fix write past end of dates[] array.

Not spotted by valgrind because that doesn't check heap or stack arrays.

9 years agoap: Fix write past end of addrs[] array.
Ralph Corderoy [Thu, 3 Nov 2016 10:36:30 +0000 (10:36 +0000)]
ap: Fix write past end of addrs[] array.

Not spotted by valgrind because that doesn't check heap or stack arrays.

9 years agoJust show relevant portion of invalid encoded string.
David Levine [Sat, 5 Nov 2016 13:49:59 +0000 (09:49 -0400)]
Just show relevant portion of invalid encoded string.

9 years agoReplaced use of freects_done() with free_content() for each message.
David Levine [Sat, 5 Nov 2016 13:46:17 +0000 (09:46 -0400)]
Replaced use of freects_done() with free_content() for each message.

Thereby not holding on to open file descriptors until termination.

9 years agoPass through message even if from relative folder.
David Levine [Thu, 3 Nov 2016 19:50:40 +0000 (15:50 -0400)]
Pass through message even if from relative folder.

9 years agoUse result, because (void) didn't prevent warning on FreeBSD 10.
David Levine [Thu, 3 Nov 2016 12:52:53 +0000 (08:52 -0400)]
Use result, because (void) didn't prevent warning on FreeBSD 10.

9 years agotest-rfc6532: Export LC_CTYPE after setting it.
Ralph Corderoy [Thu, 3 Nov 2016 11:14:55 +0000 (11:14 +0000)]
test-rfc6532: Export LC_CTYPE after setting it.

Updates commit 2c4ac164edefd18861595ec7624e5ad344b10198.

9 years agoChanged type of flags from signed to unsigned long.
David Levine [Thu, 3 Nov 2016 00:33:52 +0000 (20:33 -0400)]
Changed type of flags from signed to unsigned long.

9 years agoReplace non-ASCII characters in headers with ?'s with non-UTF8 locale.
David Levine [Thu, 3 Nov 2016 00:24:32 +0000 (20:24 -0400)]
Replace non-ASCII characters in headers with ?'s with non-UTF8 locale.

9 years agoFixed display of header field values with multibyte characters.
David Levine [Thu, 3 Nov 2016 00:08:27 +0000 (20:08 -0400)]
Fixed display of header field values with multibyte characters.

9 years agoRemoved NMH_UNUSED(hostname) because it no longer exists.
David Levine [Wed, 2 Nov 2016 15:36:07 +0000 (11:36 -0400)]
Removed NMH_UNUSED(hostname) because it no longer exists.

9 years agoAdd some Autoconf support for older OpenSSL libraries that don't support
Ken Hornstein [Wed, 2 Nov 2016 14:45:16 +0000 (10:45 -0400)]
Add some Autoconf support for older OpenSSL libraries that don't support
hostname verification.

9 years agoState netsec_set_tls()'s noverify is unused if no TLS.
Ralph Corderoy [Wed, 2 Nov 2016 12:08:04 +0000 (12:08 +0000)]
State netsec_set_tls()'s noverify is unused if no TLS.

Stops compiler warning.

9 years agoUpdate docs a bit.
Ken Hornstein [Wed, 2 Nov 2016 03:30:34 +0000 (23:30 -0400)]
Update docs a bit.

9 years agoAdd support for certificate verification when using TLS.
Ken Hornstein [Wed, 2 Nov 2016 03:13:04 +0000 (23:13 -0400)]
Add support for certificate verification when using TLS.

9 years agoPrint out more TLS information if -snoop is turned on.
Ken Hornstein [Mon, 31 Oct 2016 01:20:36 +0000 (21:20 -0400)]
Print out more TLS information if -snoop is turned on.

9 years agotest/folder: Add test-coverage; lots of check_exit.
Ralph Corderoy [Tue, 1 Nov 2016 17:49:08 +0000 (17:49 +0000)]
test/folder: Add test-coverage; lots of check_exit.

9 years agoSplit one-line condition+body to get gcov results.
Ralph Corderoy [Tue, 1 Nov 2016 17:03:14 +0000 (17:03 +0000)]
Split one-line condition+body to get gcov results.

9 years agouip/dist.c: Increase coverage.
Ralph Corderoy [Tue, 1 Nov 2016 12:37:48 +0000 (12:37 +0000)]
uip/dist.c: Increase coverage.

9 years agouip/send: -saslmech lacking argument indexed outside array.
Ralph Corderoy [Tue, 1 Nov 2016 12:23:12 +0000 (12:23 +0000)]
uip/send: -saslmech lacking argument indexed outside array.

Similar to problem in commit 171ad462ce7582196f91f93f91f99fc60a21189e.

9 years agoman: Fix spelling mistakes.
Ralph Corderoy [Tue, 1 Nov 2016 11:51:26 +0000 (11:51 +0000)]
man: Fix spelling mistakes.

9 years agoFix spelling mistake in comment.
Ralph Corderoy [Tue, 1 Nov 2016 11:49:43 +0000 (11:49 +0000)]
Fix spelling mistake in comment.

Only done because the same typo appears in the man pages.

9 years agoFix spelling mistakes in UI text.
Ralph Corderoy [Tue, 1 Nov 2016 11:49:11 +0000 (11:49 +0000)]
Fix spelling mistakes in UI text.

9 years agotest: Remove the " # gcov" comment from check_exit calls.
Ralph Corderoy [Tue, 1 Nov 2016 11:11:11 +0000 (11:11 +0000)]
test: Remove the " # gcov" comment from check_exit calls.

Now the command is passed to check_exit, that is sufficient to indicate
it's for coverage uses only, and a candidate to be fleshed out into a
test that checks the output.

9 years agouip/comp.c: Increase coverage.
Ralph Corderoy [Tue, 1 Nov 2016 00:41:58 +0000 (00:41 +0000)]
uip/comp.c: Increase coverage.

9 years agouip/burst.c: Increase coverage.
Ralph Corderoy [Tue, 1 Nov 2016 00:17:47 +0000 (00:17 +0000)]
uip/burst.c: Increase coverage.

9 years agouip/anno.c: Increase coverage.
Ralph Corderoy [Tue, 1 Nov 2016 00:08:02 +0000 (00:08 +0000)]
uip/anno.c: Increase coverage.

9 years agoanno: Stop segmentation violation on `-number 0'.
Ralph Corderoy [Tue, 1 Nov 2016 00:05:42 +0000 (00:05 +0000)]
anno: Stop segmentation violation on `-number 0'.

If atoi(3) returned zero, either because `0' was given or the number
could not be parsed, then the error message dereferenced an invalid
pointer.  Found when trying to increase coverage with check_exit.

9 years agouip/ali.c: Increase coverage.
Ralph Corderoy [Mon, 31 Oct 2016 23:13:02 +0000 (23:13 +0000)]
uip/ali.c: Increase coverage.

9 years agoali: Fix a memory leak spotted by valgrind.
Ralph Corderoy [Mon, 31 Oct 2016 18:36:19 +0000 (18:36 +0000)]
ali: Fix a memory leak spotted by valgrind.

9 years agomhbuild's fgetstr(): simplify source, logic untouched.
Ralph Corderoy [Mon, 31 Oct 2016 18:18:07 +0000 (18:18 +0000)]
mhbuild's fgetstr(): simplify source, logic untouched.

The tests aren't getting 100% coverage and the nested assignments make
it harder to see what's happening, and what needs to happen to gain
coverage.  Hoist invariants so it's clear they're such to the reader and
not just the compiler.

9 years agoRemove test files that aren't removed by check().
David Levine [Mon, 31 Oct 2016 23:01:36 +0000 (19:01 -0400)]
Remove test files that aren't removed by check().

9 years agoReplaced BUFSIZ with NMH_BUFSIZ in a few places.
David Levine [Mon, 31 Oct 2016 19:17:55 +0000 (15:17 -0400)]
Replaced BUFSIZ with NMH_BUFSIZ in a few places.

This allows the test suite to succeed with BUFSIZ of 256.  We should
consider using different constants for different purposes.

9 years agoDon't set CT type if reformat failed.
David Levine [Mon, 31 Oct 2016 19:03:07 +0000 (15:03 -0400)]
Don't set CT type if reformat failed.

9 years agoUncapitalise a few more mentions of commands in man pages.
Ralph Corderoy [Mon, 31 Oct 2016 17:56:13 +0000 (17:56 +0000)]
Uncapitalise a few more mentions of commands in man pages.

9 years agomh-mkstemp.man: Detail exit status as 255 rather than -1.
Ralph Corderoy [Mon, 31 Oct 2016 17:47:22 +0000 (17:47 +0000)]
mh-mkstemp.man: Detail exit status as 255 rather than -1.

Since that's what the outside kernel and outside world sees.

9 years agoUse new check_exit in `# gcov' tests.
Ralph Corderoy [Mon, 31 Oct 2016 17:44:24 +0000 (17:44 +0000)]
Use new check_exit in `# gcov' tests.

It showed up fmtdump wasn't being found because $? was 127, not 1.
And mkstemp exits 255 on error, unusually amongst MH commands.

9 years agotest/common.sh.in: Add test_exit() for $? checking.
Ralph Corderoy [Mon, 31 Oct 2016 17:18:11 +0000 (17:18 +0000)]
test/common.sh.in: Add test_exit() for $? checking.

The stdout and stderr of the command being tested are saved but ignored,
only regurgitated if the test fails.  The test is stated as a fragment
of a test(1) condition, e.g. '-eq 1'.  This is mainly intended for the
quick one-liners to increase gcov coverage and thus valgrind's scope.
Over time, better tests that check more of the command's behaviour can
replace these, keeping the coverage level.

9 years agoReplaced use of ! with || true, for ultimate Bourne shell compatiblity.
David Levine [Mon, 31 Oct 2016 15:39:11 +0000 (11:39 -0400)]
Replaced use of ! with || true, for ultimate Bourne shell compatiblity.

Update to commit c3ba36f92bcbf44e071961f3d0bb5e6ddab317d6.