Follow-up Comment #5, bug #67939 (group groff): [comment #1 comment #1:] > Even if this change is conceptually a good idea (I can see > arguments both for and against),
Not to be coy...
Pros:
* eliminates gs dependency for this test
* as reported, significantly cuts run time
The con is largely theoretical: The "%%Pages:" line is not required in a valid
PostScript document.
$ echo 'Hello world!' | groff | grep -v '^%%Pages: ' > still_works.ps
Load still_works.ps into your favorite PostScript viewer to verify removing
that line has no effect on the output. Indeed, because PostScript
interpreters ignore % lines, the %%Pages line can lie, which will fool grep
but not gs.
$ echo 'Hello world!' | groff | sed 's/^%%Pages: 1/%%Pages: 666/' | grep
'^%%Pages: ' | cut -d\ -f2
666
$ echo 'Hello world!' | groff | sed 's/^%%Pages: 1/%%Pages: 666/' | gs -o
/dev/null/ -sDEVICE=bbox - 2>&1 | grep HiResBoundingBox | wc -l
1
However, we're testing groff output, and we can expect groff to output
PostScript that follows certain conventions, such as a %%Pages line with an
accurate count. So I don't see any real-world downside to this change; Bjarni
just needs to iron out the implementation.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?67939>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
