2023-12-28 16:55:36 -08:00
|
|
|
use super::*;
|
|
|
|
|
2021-05-11 12:21:49 -07:00
|
|
|
#[cfg(windows)]
|
|
|
|
test! {
|
|
|
|
name: powershell,
|
|
|
|
justfile: r#"
|
|
|
|
default:
|
|
|
|
#!powershell
|
|
|
|
Write-Host Hello-World
|
|
|
|
"#,
|
|
|
|
stdout: "Hello-World\n",
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(windows)]
|
|
|
|
test! {
|
|
|
|
name: powershell_exe,
|
|
|
|
justfile: r#"
|
|
|
|
default:
|
|
|
|
#!powershell.exe
|
|
|
|
Write-Host Hello-World
|
|
|
|
"#,
|
|
|
|
stdout: "Hello-World\n",
|
|
|
|
}
|
2021-05-15 22:33:41 -07:00
|
|
|
|
|
|
|
#[cfg(windows)]
|
|
|
|
test! {
|
|
|
|
name: cmd,
|
|
|
|
justfile: r#"
|
|
|
|
default:
|
|
|
|
#!cmd /c
|
|
|
|
@echo Hello-World
|
|
|
|
"#,
|
|
|
|
stdout: "Hello-World\r\n",
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(windows)]
|
|
|
|
test! {
|
|
|
|
name: cmd_exe,
|
|
|
|
justfile: r#"
|
|
|
|
default:
|
|
|
|
#!cmd.exe /c
|
|
|
|
@echo Hello-World
|
|
|
|
"#,
|
|
|
|
stdout: "Hello-World\r\n",
|
|
|
|
}
|
2023-12-28 16:55:36 -08:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn simple() {
|
|
|
|
Test::new()
|
|
|
|
.justfile(
|
|
|
|
"
|
|
|
|
foo:
|
|
|
|
#!/bin/sh
|
|
|
|
echo bar
|
|
|
|
",
|
|
|
|
)
|
|
|
|
.stdout("bar\n")
|
|
|
|
.run();
|
|
|
|
}
|