2022-06-19 07:56:31 +03:00
|
|
|
use super::*;
|
2022-05-31 23:01:59 +03:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn windows_shell_setting() {
|
|
|
|
Test::new()
|
|
|
|
.justfile(
|
|
|
|
r#"
|
|
|
|
set windows-shell := ["pwsh.exe", "-NoLogo", "-Command"]
|
2022-08-09 05:50:31 +03:00
|
|
|
set shell := ["asdfasdfasdfasdf"]
|
|
|
|
|
|
|
|
foo:
|
|
|
|
Write-Output bar
|
|
|
|
"#,
|
|
|
|
)
|
|
|
|
.shell(false)
|
|
|
|
.stdout("bar\r\n")
|
|
|
|
.stderr("Write-Output bar\n")
|
|
|
|
.run();
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn windows_powershell_setting_uses_powershell() {
|
|
|
|
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]
|
|
|
|
fn windows_poweshell_setting_uses_powershell() {
|
|
|
|
Test::new()
|
|
|
|
.justfile(
|
|
|
|
r#"
|
|
|
|
set windows-powershell
|
2022-05-31 23:01:59 +03:00
|
|
|
|
|
|
|
foo:
|
|
|
|
Write-Output bar
|
|
|
|
"#,
|
|
|
|
)
|
|
|
|
.shell(false)
|
|
|
|
.stdout("bar\r\n")
|
|
|
|
.stderr("Write-Output bar\n")
|
|
|
|
.run();
|
|
|
|
}
|