ls: [bugfix] Fixed formatting/padding of question mark inodes#2702
ls: [bugfix] Fixed formatting/padding of question mark inodes#2702mtsoltan wants to merge 6 commits intouutils:mainfrom
ls: [bugfix] Fixed formatting/padding of question mark inodes#2702Conversation
…perly. Explicitly put :>8 to right-format inodes, and never left-format them (in case of a question-mark for example).
…the question-mark. This is to make sure the behavior does not regress.
|
Interestingly enough, it fails to pass the test I created for it in windows. I'll cross-compile it to windows and test it on my windows machine tomorrow. |
|
Great work! A possible solution to the windows tests might be to pass an explicit width parameter to the command, because it looks like it is putting everything in one column. This is not because of your PR but because of the terminal size the CI uses. Something like this might fix it: scene
.ucmd()
.arg("-Li")
.arg("temp_dir")
.arg("-w40")
.succeeds()
.stdout_contains(if cfg!(windows) {
" dangle"
} else {
" ? dangle"
}); |
I'm working on the ls error behavior right now. I'll take a look at this. |
|
This PR has been overtaken by #2809. Thanks for your work on this! Sorry it didn't make it in. |
|
Thank you for finishing it! I'm really sorry I couldn't finish it myself. It's like reserving the cookie jar then leaving the cookies to rot :( I'll get back to contributing to this repository once I have more time on my hands. :3 Have a good time! |
|
No problem! Looking forward to more of your contribution in the future! |
Previous behavior: Question mark inodes (for non-existent symlinks) used to cause the item to be unaligned to the column, as the question marks don't take any padding ->
Expected behavior: Item names align, and the question marks pad to the right to be in line with the least significant digit of other inodes in the same column ->
Behavior after this pull request: The errors are not displayed (this is explained in a pre-existing comment in
test_ls.rs::test_ls_dangling_symlinks()), but the padding of the question-mark is fixed ->