aboutsummaryrefslogtreecommitdiff
path: root/examples/test-example-async.toml
blob: a63f56619007ed4f6c016a06127b6b507475b4f1 (plain) (blame)
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
[[test.example-async]]
command = "hello World"
expect.exit-code = 0
expect.result = "Hello, World!"

[[test.example-basic]]
command = "hello World"
expect.exit-code = 0
expect.result = "Hello, World!"

[[test.example-exit-code]]
command = "error"
expect.exit-code = 1
expect.result = "Exit with exit code: 1"

[[test.example-general-renderer]]
command = "render Bob 22"
expect.exit-code = 0
expect.result = "Bob is 22 years old"

[[test.example-general-renderer]]
command = "render Bob 22 --json"
expect.exit-code = 0
expect.result = "{\"member_name\":\"Bob\",\"member_age\":22}"

[[test.example-general-renderer]]
command = "render Bob 22 --yaml"
expect.exit-code = 0
expect.result = "member_name: Bob\nmember_age: 22"

[[test.example-picker]]
command = "pick Bob"
expect.exit-code = 0
expect.result = "Picked: name = Bob, age = 20"

[[test.example-picker]]
command = "pick Bob --age -15"
expect.exit-code = 0
expect.result = "Picked: name = Bob, age = 0"

[[test.example-picker]]
command = "pick --age 99"
expect.exit-code = 0
expect.result = "No name provided."

[[test.example-picker]]
command = "pick"
expect.exit-code = 0
expect.result = "No name provided."

[[test.example-picker]]
command = "pick --age 150"
expect.exit-code = 0
expect.result = "No name provided."