nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] m_getfld() bug fix


From: Ralph Corderoy
Subject: Re: [Nmh-workers] m_getfld() bug fix
Date: Sun, 08 Dec 2013 00:23:22 +0000

Hi David,

> The test relies on diff -b to compare the text lines.
> Two problems here:
> 
> 1) POSIX diff only has -b (not -w), and it says that a line with no
> space is different than the otherwise same line with leading space.

sed 's/^/ /' on both files beforehand would make -b happy?  Expected can
be done once, actual each time...

> 2) elinks inserts some non-breakable spaces (U+00A0), and GNU diff
> doesn't recognize them as whitespace (my LANG is en_US.UTF-8).

Here, this elinks doesn't, even with that LANG, but it could well have
changed.  Do the test scripts set the locale, e.g. LC_ALL, so we know
elinks will be using UTF-8 for U+00A0?  If so, it can be replaced with
sed.

    mhfixmsg last -outfile - -verbose 2>"$actual.err" |
    sed 's/^/ /; s/'"`printf '\\302\\240'`"'/ /g' |
    uniq >"$actual"

POSIX's Basic Regular Expressions don't support \302 octal notation so
sed doesn't have them, but POSIX's printf(1) does so we use it to
generated the UTF-8;  just like tr used to be used, e.g. tr x \\033.

Is that what you're after?

Cheers, Ralph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]