Skip to content

Commit

Permalink
tests: test for extra rcfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
mistydemeo committed Dec 4, 2023
1 parent 851b67e commit 00fd938
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cargo-dist/tests/gallery/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,11 @@ impl DistResult {
// we could theoretically look at the above output and parse out the `source` line...

// Check that the script wrote files where we expected
let rcfile = tempdir.join(".profile");
let rcfiles = &[
tempdir.join(".profile"),
tempdir.join(".bash_profile"),
tempdir.join(".zshrc"),
];
let expected_bin_dir = Utf8PathBuf::from(expected_bin_dir);
let bin_dir = tempdir.join(&expected_bin_dir);
let env_dir = if expected_bin_dir
Expand All @@ -390,7 +394,9 @@ impl DistResult {
let env_script = env_dir.join("env");

assert!(bin_dir.exists(), "bin dir wasn't created");
assert!(rcfile.exists(), ".profile wasn't created");
for rcfile in rcfiles {
assert!(rcfile.exists(), "{} wasn't created", rcfile);
}
assert!(env_script.exists(), "env script wasn't created");

// Check that all the binaries work
Expand Down

0 comments on commit 00fd938

Please sign in to comment.