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=`"?url=https%3A%2F%2Fgithub.com%2Fhome%2Fosomon%2Fbuild%2Fuutils%2Fdiffutils%2Ftarget%2Frelease%2Fdiffutils" "foo.txt" "?url=https%3A%2F%2Fgithub.com%2Ftmp%2F.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.