-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_jenrik.toml
130 lines (104 loc) · 2.41 KB
/
test_jenrik.toml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
binary_path = "./jenrik"
[invalid_arg]
args = ["-h"]
status = 1
[no_args]
args = []
status = 1
[init_only]
args = ["init"]
status = 1
[invalid_test_file]
args = ["toito"]
stderr = "toito : file not found\n"
status = 1
[invalid_test_file_but_toml]
args = ["toito.toml"]
stderr = "toito.toml : file not found\n"
status = 1
[overwrite_init_test_jenrik_toml]
args = ["init", "jenrik"]
stderr = "test_jenrik.toml already exists, can't init the file\n"
status = 1
[test_working_init]
args = ["init", "my_bin"]
status = 0
post = "rm -f test_my_bin.toml"
[empty_toml]
args = ["tests/empty.toml"]
status = 1
stderr = "Could not find binary_path key in tests/empty.toml\n"
[invalid_binary_path]
args = ["tests/invalid_path.toml"]
status = 1
stderr = "./toitoi : file not found\n"
[invalid_test_key]
args = ["tests/invalid_test_key.toml"]
status = 1
stderr = "invalid_test: Unknown key : toto\n"
[duplicate_stdout]
args = ["tests/duplicate_stdout.toml"]
status = 1
stderr = "invalid_test: Incompatible keys, 'stdout' and 'stdout_file'\n"
[duplicate_stderr]
args = ["tests/duplicate_stderr.toml"]
status = 1
stderr = "invalid_test: Incompatible keys, 'stderr' and 'stderr_file'\n"
[bad_test]
args = ["tests/invalid_test.toml"]
status = 1
stderr = "Invalid test : 'my_bad_test toto'\n"
[invalid_ouput_file]
args = ["tests/invalid_output_file.toml"]
status = 1
stderr = "tests/README.md : file not found\n"
[test_pipe_basic_stdout]
args = []
status = 1
pipe_stdout = "| grep \"USAGE\""
stdout = "USAGE : ./jenrik file.jrk | init path_to_binary\n"
[test_pipe_two_pipes_stdout]
args = []
status = 1
pipe_stdout = "| grep \"USAGE\" | cut -d ' ' -f1"
stdout = "USAGE\n"
[test_pipe_stderr]
args = ["tests/duplicate_stderr.toml"]
status = 1
pipe_stderr = "| cut -d ':' -f1"
stderr = "invalid_test\n"
[test_timeout_success]
args = []
status = 1
timeout= 0.1
[test_timeout_fail]
args = []
status = 1
timeout= 0
should_fail = true
[test_timeout_loop]
args = ["tests/infinite_loop.toml"]
status = 0
timeout = 0.5
should_fail = true
[test_status_should_fail]
args = []
status = 0
should_fail = true
[test_stdin]
args = ["tests/test_stdin.toml"]
status = 0
[test_env]
args = ["tests/echo_user_test.toml"]
status = 0
[test_bad_env_values]
args = ["tests/test_bad_types.toml"]
status = 1
[test_repeat_5_times]
args = []
status = 1
repeat = 5
[test_invalid_build_command]
args = ["tests/test_build_command.toml"]
status = 1
stderr = "build_command value must be a string\n"