-
Notifications
You must be signed in to change notification settings - Fork 705
Expand file tree
/
Copy pathwindows_script_interpreter.rs
More file actions
48 lines (43 loc) · 990 Bytes
/
windows_script_interpreter.rs
File metadata and controls
48 lines (43 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
use super::*;
#[test]
fn windows_script_interpreter_setting() {
Test::new()
.justfile(
r#"
set unstable
set windows-script-interpreter := ["pwsh.exe", "-NoLogo", "-Command"]
set script-interpreter := ["asdfasdfasdfasdf"]
[script]
foo:
Write-Output bar
"#,
)
.shell(false)
.stdout("bar\r\n")
.run();
}
#[test]
fn script_interpreter_setting_is_unstable() {
Test::new()
.justfile("set windows-script-interpreter := ['sh']")
.status(EXIT_FAILURE)
.stderr_regex(r"error: The `windows-script-interpreter` setting is currently unstable\..*")
.run();
}
#[test]
fn overrides_script_interpreter() {
Test::new()
.justfile(
r#"
set unstable
set script-interpreter := ["cmd.exe", "/c"]
set windows-script-interpreter := ["pwsh.exe", "-NoLogo", "-Command"]
[script]
foo:
Write-Output bar
"#,
)
.shell(false)
.stdout("bar\r\n")
.run();
}