From 00fd9389ccdfc7d198fae2f8a026f620c38e359c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Misty=20De=20M=C3=A9o?= Date: Mon, 4 Dec 2023 11:58:28 -0800 Subject: [PATCH] tests: test for extra rcfiles --- cargo-dist/tests/gallery/dist.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cargo-dist/tests/gallery/dist.rs b/cargo-dist/tests/gallery/dist.rs index 4137833de..34346041e 100644 --- a/cargo-dist/tests/gallery/dist.rs +++ b/cargo-dist/tests/gallery/dist.rs @@ -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 @@ -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