1
1
mirror of https://github.com/casey/just.git synced 2024-11-23 11:04:09 +03:00
just/tests/windows_shell.rs

55 lines
918 B
Rust
Raw Normal View History

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]
2022-12-30 23:36:08 +03:00
fn windows_powershell_setting_uses_powershell_set_shell() {
2022-08-09 05:50:31 +03: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 23:36:08 +03:00
fn windows_powershell_setting_uses_powershell() {
2022-08-09 05:50:31 +03:00
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();
}