[Top][All Lists]

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

[PATCH] fix for groff Git regression (Savannah #64005)

From: Ralph Corderoy
Subject: [PATCH] fix for groff Git regression (Savannah #64005)
Date: Thu, 06 Apr 2023 12:59:57 +0100

Hi Branden,

> Feedback welcome.
> +input='.pl 18v
> +.LP
> +The first page is \n%.
> +.DS
> +display
> +.DE
> +.bp
> +.LP
> +The second page is \n%.
> \n(nlu'
> +
> +output=$(printf '%s\n' "$input" | "$groff" -Tascii -P-cbou -ms)
> +echo "$output"
> +echo "$output" | grep -Fqx 'The second page is 2.'

Would it be worth testing all of $output is exactly as expected?
This would widen what's being tested which may catch a future regression
outside the scope of this test, e.g. with .DS/.DE.
The downside is a deliberate change might ripple through more tests but
the fix-up should be straightforward and would preserve the wider

$output can be encoded if it's considered too long.  These two are


    The first page is 1.



    The second page is 2.'

    ',,,,,,The first page is 1.,,     display,,,,,,,,,
    ,,,                             -2-,,,The second page is 2.
    output=$(echo "$output" | tr , \\012)

Cheers, Ralph.

reply via email to

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