Skip to content

Commit a106b80

Browse files
author
Dilawar Singh
committed
cargo +nightly fmt
1 parent 80ab9f5 commit a106b80

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/lib.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,16 @@ ls $TEMP
147147
assert!(x.stdout.len() > 10);
148148
assert!(x.stderr.is_empty())
149149
}
150+
151+
#[test]
152+
#[cfg(windows)]
153+
fn test_install_choco() {
154+
// choco is typically installed on github runners.
155+
let x = run_script("Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))", true).unwrap();
156+
println!("{x:?}");
157+
158+
let x = run_script("choco.exe --version", true).unwrap();
159+
println!("{x:?}");
160+
assert!(!x.stdout.is_empty());
161+
}
150162
}

0 commit comments

Comments
 (0)