12
12
13
13
from test_utils import *
14
14
15
- def setup_test ():
16
- change_dir (test_config . current_test )
15
+ def setup_test (single_case_text ):
16
+ change_dir (single_case_text . name , single_case_text )
17
17
return True
18
18
19
- def migrate_test ():
19
+ def migrate_test (single_case_text ):
20
20
res = True
21
21
22
22
call_subprocess (test_config .CT_TOOL + " --autocomplete=--gen-build" )
23
23
reference = '--gen-build-script\n '
24
- res = res and (reference == test_config . command_output )
24
+ res = res and (reference == single_case_text . command_text )
25
25
26
26
call_subprocess (test_config .CT_TOOL + " --autocomplete=-gen-build" )
27
27
reference = '-gen-build-script\n '
28
- res = res and (reference == test_config . command_output )
28
+ res = res and (reference == single_case_text . command_text )
29
29
30
30
call_subprocess (test_config .CT_TOOL + " --autocomplete=foo" )
31
31
reference = '\n '
32
- res = res and (reference == test_config . command_output )
32
+ res = res and (reference == single_case_text . command_text )
33
33
34
34
call_subprocess (test_config .CT_TOOL + " --autocomplete=--output-verbosity=#d" )
35
35
reference = 'detailed\n ' + \
36
36
'diagnostics\n '
37
- res = res and (reference == test_config . command_output )
37
+ res = res and (reference == single_case_text . command_text )
38
38
39
39
call_subprocess (test_config .CT_TOOL + " --autocomplete=-output-verbosity=#d" )
40
40
reference = 'detailed\n ' + \
41
41
'diagnostics\n '
42
- res = res and (reference == test_config . command_output )
42
+ res = res and (reference == single_case_text . command_text )
43
43
44
44
call_subprocess (test_config .CT_TOOL + " --autocomplete=--output-verbosity=" )
45
45
reference = 'detailed\n ' + \
46
46
'diagnostics\n ' + \
47
47
'normal\n ' + \
48
48
'silent\n '
49
- res = res and (reference == test_config . command_output )
49
+ res = res and (reference == single_case_text . command_text )
50
50
51
51
call_subprocess (test_config .CT_TOOL + " --autocomplete=-output-verbosity=" )
52
52
reference = 'detailed\n ' + \
53
53
'diagnostics\n ' + \
54
54
'normal\n ' + \
55
55
'silent\n '
56
- res = res and (reference == test_config . command_output )
56
+ res = res and (reference == single_case_text . command_text )
57
57
58
58
call_subprocess (test_config .CT_TOOL + " --autocomplete=foo#bar##--enable-c" )
59
59
reference = '--enable-ctad\n '
60
- res = res and (reference == test_config . command_output )
60
+ res = res and (reference == single_case_text . command_text )
61
61
62
62
call_subprocess (test_config .CT_TOOL + " --autocomplete=foo#bar###--format-range=#a" )
63
63
reference = 'all\n '
64
- res = res and (reference == test_config . command_output )
64
+ res = res and (reference == single_case_text . command_text )
65
65
66
66
call_subprocess (test_config .CT_TOOL + " --autocomplete=--rule-file=" )
67
67
reference = '\n '
68
- res = res and (reference == test_config . command_output )
68
+ res = res and (reference == single_case_text . command_text )
69
69
70
70
call_subprocess (test_config .CT_TOOL + " --autocomplete=--rule-file" )
71
71
reference = '--rule-file\n '
72
- res = res and (reference == test_config . command_output )
72
+ res = res and (reference == single_case_text . command_text )
73
73
74
74
call_subprocess (test_config .CT_TOOL + " --autocomplete=-p=" )
75
75
reference = '\n '
76
- res = res and (reference == test_config . command_output )
76
+ res = res and (reference == single_case_text . command_text )
77
77
78
78
call_subprocess (test_config .CT_TOOL + " --autocomplete=-p" )
79
79
reference = '-p\n ' + \
80
80
'-process-all\n '
81
- res = res and (reference == test_config . command_output )
81
+ res = res and (reference == single_case_text . command_text )
82
82
83
83
call_subprocess (test_config .CT_TOOL + " --autocomplete=--usm-level=#none,restricted#--use-explicit-namespace=#cl,sycl," )
84
84
reference = 'cl,sycl,cl\n ' + \
85
85
'cl,sycl,dpct\n ' + \
86
86
'cl,sycl,none\n ' + \
87
87
'cl,sycl,sycl\n ' + \
88
88
'cl,sycl,sycl-math\n '
89
- res = res and (reference == test_config . command_output )
89
+ res = res and (reference == single_case_text . command_text )
90
90
91
91
call_subprocess (test_config .CT_TOOL + " --autocomplete=--usm-level=#none,restricted#--use-explicit-namespace=#cl,sycl,s" )
92
92
reference = 'cl,sycl,sycl\n ' + \
93
93
'cl,sycl,sycl-math\n '
94
- res = res and (reference == test_config . command_output )
94
+ res = res and (reference == single_case_text . command_text )
95
95
96
96
call_subprocess (test_config .CT_TOOL + " --autocomplete=" )
97
97
reference = '\n '
98
- res = res and (reference == test_config . command_output )
98
+ res = res and (reference == single_case_text . command_text )
99
99
100
100
call_subprocess (test_config .CT_TOOL + " --autocomplete=," )
101
101
reference = '\n '
102
- res = res and (reference == test_config . command_output )
102
+ res = res and (reference == single_case_text . command_text )
103
103
104
104
call_subprocess (test_config .CT_TOOL + " --autocomplete==" )
105
105
reference = '\n '
106
- res = res and (reference == test_config . command_output )
106
+ res = res and (reference == single_case_text . command_text )
107
107
108
108
call_subprocess (test_config .CT_TOOL + " --autocomplete=,," )
109
109
reference = '\n '
110
- res = res and (reference == test_config . command_output )
110
+ res = res and (reference == single_case_text . command_text )
111
111
112
112
call_subprocess (test_config .CT_TOOL + " --autocomplete=-" )
113
113
opts = ['--always-use-async-handler\n ' ,
@@ -152,20 +152,20 @@ def migrate_test():
152
152
'--version\n ' ,
153
153
'-p\n ' ]
154
154
for opt in opts :
155
- res = res and (opt in test_config . command_output )
155
+ res = res and (opt in single_case_text . command_text )
156
156
157
157
call_subprocess (test_config .CT_TOOL + " --autocomplete=##" )
158
158
reference = '\n '
159
- res = res and (reference == test_config . command_output )
159
+ res = res and (reference == single_case_text . command_text )
160
160
161
161
call_subprocess (test_config .CT_TOOL + " --autocomplete=#" )
162
162
reference = '\n '
163
- res = res and (reference == test_config . command_output )
163
+ res = res and (reference == single_case_text . command_text )
164
164
165
165
return res
166
166
167
- def build_test ():
167
+ def build_test (single_case_text ):
168
168
return True
169
169
170
- def run_test ():
170
+ def run_test (single_case_text ):
171
171
return True
0 commit comments