Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration test (cannot_read_files) fails when there is a file named "foo.txt" in working directory #61

Closed
oSoMoN opened this issue Apr 23, 2024 · 0 comments

Comments

@oSoMoN
Copy link
Collaborator

oSoMoN commented Apr 23, 2024

touch foo.txt
cargo test --release cannot_read_files

results in:

test cannot_read_files ... FAILED

failures:

---- cannot_read_files stdout ----
thread 'cannot_read_files' panicked at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5:
Unexpected return code, failed var == 2
└── var: 0

command=`"/home/osomon/build/uutils/diffutils/target/release/diffutils" "foo.txt" "/tmp/.tmpwvzk9c"`
code=0
stdout=""

This is because the test expects a file named "foo.txt" to not exist in the current working directory. If the file exists, the test fails.

sylvestre added a commit that referenced this issue Apr 23, 2024
Un-hardcode a test filename in an integration test (fixes #61)
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

No branches or pull requests

1 participant