-
Notifications
You must be signed in to change notification settings - Fork 499
/
assignment.rs
56 lines (53 loc) · 1002 Bytes
/
assignment.rs
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
49
50
51
52
53
54
55
56
use super::*;
test! {
name: set_export_parse_error,
justfile: "
set export := fals
",
stdout: "",
stderr: "
error: Expected keyword `true` or `false` but found identifier `fals`
——▶ justfile:1:15
│
1 │ set export := fals
│ ^^^^
",
status: EXIT_FAILURE,
}
test! {
name: set_export_parse_error_eol,
justfile: "
set export :=
",
stdout: "",
stderr: "
error: Expected identifier, but found end of line
——▶ justfile:1:14
│
1 │ set export :=
│ ^
",
status: EXIT_FAILURE,
}
#[test]
fn invalid_attributes_are_an_error() {
Test::new()
.justfile(
"
[group: 'bar']
x := 'foo'
",
)
.args(["--evaluate", "x"])
.stderr(
"
error: Assignment `x` has invalid attribute `group`
——▶ justfile:2:1
│
2 │ x := 'foo'
│ ^
",
)
.status(EXIT_FAILURE)
.run();
}