Merged
Conversation
Before those fixes, running the test suite resulted in the following
errors:
```
running 9 tests
test tests::test_can_tail_file_with_directory ... ok
test tests::test_can_tail_file_with_nonexistent_file ... FAILED
test tests::test_can_tail_file_with_existing_file ... ok
test tests::test_can_tail_file_with_unreadable_file ... ok
test tests::test_run_command_nonexistent_command ... ok
test tests::test_run_command_success ... ok
test tests::test_run_command_with_args ... ok
test tests::test_main_fails_without_fallback_command ... FAILED
test tests::test_run_command_calling_tailor_again ... ok
failures:
---- tests::test_can_tail_file_with_nonexistent_file stdout ----
thread 'tests::test_can_tail_file_with_nonexistent_file' panicked at src/main.rs:114:9:
Should not be able to tail a nonexistent file
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- tests::test_main_fails_without_fallback_command stdout ----
thread 'tests::test_main_fails_without_fallback_command' panicked at /home/skia/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5:
Unexpected success
command=`"/home/skia/workspace/ubuntu/tailor/target/debug/tailor" "/tmp/nonexistent_file_12345"`
code=0
stdout=""
stderr=""
failures:
tests::test_can_tail_file_with_nonexistent_file
tests::test_main_fails_without_fallback_command
test result: FAILED. 7 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
```
I believe this is because the test suite is too opinionated, and relies
on an arbitrary file not existing.
I happened to use that important file in my personal workflow, hence the
test suite broke.
Thankfully, I'm a nice contributor and was able to use my skills to fix
this. It now passes on my machine. Thank you.
nadzyah
approved these changes
Nov 5, 2025
Member
nadzyah
left a comment
There was a problem hiding this comment.
Thank you for fixing the typos and improving tests!
Member
Author
|
Just added all the reviewers because I thought it took to much time to get reviewed, but then @nadzyah merged it, so thanks, and not sorry for the noise :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please read the full commit description. I won't repeat myself.