Skip to content

Commit 8a38564

Browse files
authored
Merge pull request #3470 from rbtcollins/ui-test-isolation
Isolate trycmd tests from environment
2 parents 7a90f08 + 4e301cc commit 8a38564

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/suite/cli_ui.rs

+4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ use rustup_macros::integration_test as test;
55
#[test]
66
fn rustup_ui_doc_text_tests() {
77
let t = trycmd::TestCases::new();
8+
let home = tempfile::TempDir::new().unwrap();
89
let rustup_init = trycmd::cargo::cargo_bin("rustup-init");
910
let rustup = trycmd::cargo::cargo_bin("rustup");
1011
// Copy rustup-init to rustup so that the tests can run it.
1112
fs::copy(rustup_init, &rustup).unwrap();
1213
t.register_bin("rustup", &rustup);
1314
t.case("tests/suite/cli-ui/rustup/*.toml");
15+
// once installed rustup asserts the presence of ~/.rustup/settings.toml if
16+
// Config is instantiated.
17+
t.env("HOME", home.path().to_string_lossy());
1418
#[cfg(target_os = "windows")]
1519
{
1620
// On windows, we don't have man command, so skip the test.

0 commit comments

Comments
 (0)