use assert_cmd::Command; #[test] fn command_default() { let depot_dir = assert_fs::TempDir::new().unwrap(); Command::cargo_bin("juliaup") .unwrap() .arg("add") .arg("1.6.0") .env("JULIA_DEPOT_PATH", depot_dir.path()) .env("JULIAUP_DEPOT_PATH", depot_dir.path()) .assert() .success() .stdout(""); Command::cargo_bin("juliaup") .unwrap() .arg("default") .arg("1.6.0") .env("JULIA_DEPOT_PATH", depot_dir.path()) .env("JULIAUP_DEPOT_PATH", depot_dir.path()) .assert() .success() .stdout(""); Command::cargo_bin("julia") .unwrap() .arg("-e") .arg("print(VERSION)") .env("JULIA_DEPOT_PATH", depot_dir.path()) .env("JULIAUP_DEPOT_PATH", depot_dir.path()) .assert() .success() .stdout("1.6.0"); }