2022-06-18 21:56:31 -07:00
|
|
|
use super::*;
|
2022-05-31 13:01:59 -07:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn windows_shell_setting() {
|
|
|
|
Test::new()
|
|
|
|
.justfile(
|
|
|
|
r#"
|
|
|
|
set windows-shell := ["pwsh.exe", "-NoLogo", "-Command"]
|
2022-08-08 19:50:31 -07:00
|
|
|
set shell := ["asdfasdfasdfasdf"]
|
|
|
|
|
|
|
|
foo:
|
|
|
|
Write-Output bar
|
|
|
|
"#,
|
|
|
|
)
|
|
|
|
.shell(false)
|
|
|
|
.stdout("bar\r\n")
|
|
|
|
.stderr("Write-Output bar\n")
|
|
|
|
.run();
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
2022-12-30 12:36:08 -08:00
|
|
|
fn windows_powershell_setting_uses_powershell_set_shell() {
|
2022-08-08 19:50:31 -07:00
|
|
|
Test::new()
|
|
|
|
.justfile(
|
|
|
|
r#"
|
|
|
|
set windows-powershell
|
|
|
|
set shell := ["asdfasdfasdfasdf"]
|
|
|
|
|
|
|
|
foo:
|
|
|
|
Write-Output bar
|
|
|
|
"#,
|
|
|
|
)
|
|
|
|
.shell(false)
|
|
|
|
.stdout("bar\r\n")
|
|
|
|
.stderr("Write-Output bar\n")
|
|
|
|
.run();
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
2022-12-30 12:36:08 -08:00
|
|
|
fn windows_powershell_setting_uses_powershell() {
|
2022-08-08 19:50:31 -07:00
|
|
|
Test::new()
|
|
|
|
.justfile(
|
|
|
|
r#"
|
|
|
|
set windows-powershell
|
2022-05-31 13:01:59 -07:00
|
|
|
|
|
|
|
foo:
|
|
|
|
Write-Output bar
|
|
|
|
"#,
|
|
|
|
)
|
|
|
|
.shell(false)
|
|
|
|
.stdout("bar\r\n")
|
|
|
|
.stderr("Write-Output bar\n")
|
|
|
|
.run();
|
|
|
|
}
|