Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Simplify get_exec_path using CARGO_BIN_EXE_toml
This seems to be the way Cargo docs prescribe: https://doc.rust-lang.org/cargo/reference/cargo-targets.html#integration-tests The code comes out much nicer... and it also behaves more robustly, because Cargo doesn't set CARGO_TARGET_DIR; it reads it, and there are several other ways to tell Cargo the same thing: https://doc.rust-lang.org/cargo/reference/config.html#buildtarget-dir So this new version will work correctly with, e.g., `cargo test --target-dir=…`, while the old version would break.
- Loading branch information