Skip to content

tr: Remove the extra newline in stderr#4339

Merged
tertsdiepraam merged 1 commit intouutils:mainfrom
howjmay:tr-newline
Feb 14, 2023
Merged

tr: Remove the extra newline in stderr#4339
tertsdiepraam merged 1 commit intouutils:mainfrom
howjmay:tr-newline

Conversation

@howjmay
Copy link
Copy Markdown
Contributor

@howjmay howjmay commented Feb 10, 2023

closes #4301

@howjmay howjmay changed the title tr: Removed the extra newline in stderr tr: Remove the extra newline in stderr Feb 10, 2023
@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/tail-2/inotify-dir-recreate. tests/tail-2/inotify-dir-recreate is passing on 'main'. Maybe you have to rebase?

Comment thread src/uu/tr/src/operation.rs Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code coverage tool says that line 45 and line 48 are not covered by our tests. This is good as is, but if you feel up to it, it would be nice to add two more tests to the test_tr.rs file, one for each of these.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I am having problems to understand the error messages. I am glad to add tests to cover the errors, but I need your help to explain the errors. Otherwise I don't really have idea how to trigger them

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are two invocations that trigger these errors:

tr '[a*]' 'a'
tr 'a' '[a*][a*]'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/tail-2/inotify-dir-recreate. tests/tail-2/inotify-dir-recreate is passing on 'main'. Maybe you have to rebase?

Copy link
Copy Markdown
Collaborator

@tertsdiepraam tertsdiepraam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tertsdiepraam tertsdiepraam merged commit df7fe29 into uutils:main Feb 14, 2023
@howjmay
Copy link
Copy Markdown
Contributor Author

howjmay commented Feb 15, 2023

Thank you too

@howjmay howjmay deleted the tr-newline branch February 15, 2023 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tr: Error output ends with two newlines instead of one

3 participants