test: fix man page formatting by adding blank lines in after-help text#9005
test: fix man page formatting by adding blank lines in after-help text#9005Agent-Hellboy wants to merge 8 commits into
Conversation
|
GNU testsuite comparison: |
matttbe
left a comment
There was a problem hiding this comment.
@Agent-Hellboy thanks for fixing that! I just did (almost) the same on my side, then I saw your PR :)
I think you need more new lines: on my side, I had to double each new line in the test-after-help section, see: https://manpages.ubuntu.com/manpages/questing/en/man1/test.1.html
|
|
||
| File operations: | ||
| - FILE1 -ef FILE2 FILE1 and FILE2 have the same device and inode numbers | ||
| - FILE1 -nt FILE2 FILE1 is newer (modification date) than FILE2 |
There was a problem hiding this comment.
Sorry, I didn't mean doubling the lines you already did below, but all the ones here and above.
There was a problem hiding this comment.
Let me find all instances and fix it
|
GNU testsuite comparison: |
|
|
||
| - EXPRESSION1 -o EXPRESSION2 either EXPRESSION1 or EXPRESSION2 is true | ||
|
|
||
| String operations: |
There was a problem hiding this comment.
You also need a newline here below
|
|
||
| - STRING1 != STRING2 the strings are not equal | ||
|
|
||
| Integer comparisons: |
|
|
||
| - INTEGER1 -ne INTEGER2 INTEGER1 is not equal to INTEGER2 | ||
|
|
||
| File operations: |
|
|
||
| - EXPRESSION1 -o EXPRESSION2 EXPRESSION1 ou EXPRESSION2 est vraie | ||
|
|
||
| Opérations sur les chaînes : |
|
|
||
| - STRING1 != STRING2 les chaînes ne sont pas égales | ||
|
|
||
| Comparaisons d'entiers : |
|
|
||
| - INTEGER1 -ne INTEGER2 INTEGER1 n'est pas égal à INTEGER2 | ||
|
|
||
| Opérations sur les fichiers : |
matttbe
left a comment
There was a problem hiding this comment.
It looks like you added new lines above my comments, not below.
On the screenshot, the first entry is on the same line as the list introduction line.
|
could you please add a test that would verify that the manpage output is correct ? thanks |
|
GNU testsuite comparison: |
Ohh, sorry , I can also see it😬 |
Sure thing. |
|
GNU testsuite comparison: |
|
@matttbe I guess CI failures are not related. |
|
@Agent-Hellboy I think the |
Yeah, I expanded and saw |
matttbe
left a comment
There was a problem hiding this comment.
Thanks for the last update. The modifications in the man pages look good to me. It is similar to what I did, except that in your version, you added an extra new line (2 in total then) before each list introduction sentence, but I guess that's fine.
Regarding the tests, I'm not sure how they work, but could you eventually have a generic version that is not specific to the test man pages? e.g. each line starting with a - should have an empty new line before?
If you do that, please add a link to the bug report or PR you opened in the other project to render this part correctly. So when this part is fixed, the test can be adapted.
|
@matttbe, first of all, I apologize for not verifying my change closely enough several times.
sure, but we need to validate for test.
Yeah I did that please check
sure |
OK, I don't exactly know the policy for this project, but the tests you added might be enough. I hope someone else will be able to comment about that.
I'm not sure that's what you did. What I meant is that the formatting issue is not specific to the I don't know if you can use regex with multiple lines but you should not have any hits for something like this in the |
Merging this PR will not alter performance
Comparing Footnotes
|
|
GNU testsuite comparison: |
I guess we need to add a comment in ftl files. As these tests are integration test and just check the man file formatting, it doesn't care about how it gets generated and all
I guess it's okay, but if you want, I can add regex for this kind of validation in some other PR. |
|
GNU testsuite comparison: |
matttbe
left a comment
There was a problem hiding this comment.
Thanks for the last update!
The code looks good to me, but I'm not part of the project, and I don't know the policy around the tests. I have one suggestion, but this PR is maybe not the right place to do that, I don't know.
Hopefully someone from the project can continue the review :)
| // the formatting issue is consistent across all utilities | ||
|
|
||
| // Test a representative sample of utilities | ||
| let utilities_to_test = vec!["cat", "test", "wc", "uniq", "echo", "head", "tail", "cut"]; |
There was a problem hiding this comment.
Why only a selection? Is it not possible to check all man pages? All of them should be properly formatted.
(Or maybe it is not the right place for that kind of tests?)
What you did looks good to me:
Would be even better if this check is done for all man-pages, but not sure what's possible there. One last thing: the CI spot some issues. It looks like they are related to your new tests. |
matttbe
left a comment
There was a problem hiding this comment.
the modifications in the .ftl look good to me. The CI is complaining about the rest. Can someone review the rest please?
matttbe
left a comment
There was a problem hiding this comment.
(sorry, just to avoid confusions, better mark this PR as "Request changes")
|
Thanks @matttbe for the review and being patient, I will look at everything carefully after the festival ends at my place, I don't want to rush on anything now. |
|
@Agent-Hellboy if having tests checking if a newline is added after each line ending with Having a fix for the unreadable test man page might be better to have than checking for future regressions due to an external lib not handling formatting in the |

fixes #8362