summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/add_test/RunCMakeTest.cmake
blob: 6e9edda81bbe30dedee8360a79f64d31ab8f67bf (plain)
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
include(RunCTest)

set(ENV{CTEST_OUTPUT_ON_FAILURE} 1)

function(run_NameIsAlphaNumeric1_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ abcdefghijklmnopqrstuvwxyz0123456789 ]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ abcdefghijklmnopqrstuvwxyz0123456789 ]==])
  run_ctest(NameIsAlphaNumeric1)
endfunction()
run_NameIsAlphaNumeric1_test()

function(run_NameIsAlphaNumeric2_test)
  set(CASE_CMAKELISTS_NAME_1 [==["abcdefghijklmnopqrstuvwxyz0123456789"]==])
  set(CASE_CMAKELISTS_NAME_2 [==["abcdefghijklmnopqrstuvwxyz0123456789"]==])
  run_ctest(NameIsAlphaNumeric2)
endfunction()
run_NameIsAlphaNumeric2_test()

function(run_NameIsAlphaNumeric3_test)
  set(CASE_CMAKELISTS_NAME_1 [==["abcdefghijklmnopqrstuvwxyz0123456789"]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ abcdefghijklmnopqrstuvwxyz0123456789 ]==])
  run_ctest(NameIsAlphaNumeric3)
endfunction()
run_NameIsAlphaNumeric3_test()

function(run_NameIsAlphaNumeric4_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ abcdefghijklmnopqrstuvwxyz0123456789 ]==])
  set(CASE_CMAKELISTS_NAME_2 [==["abcdefghijklmnopqrstuvwxyz0123456789"]==])
  run_ctest(NameIsAlphaNumeric4)
endfunction()
run_NameIsAlphaNumeric4_test()


function(run_NameContainsValidSpecialChars1_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ abc_.+-012 ]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ abc_.+-012 ]==])
  run_ctest(NameContainsValidSpecialChars1)
endfunction()
run_NameContainsValidSpecialChars1_test()

function(run_NameContainsValidSpecialChars2_test)
  set(CASE_CMAKELISTS_NAME_1 [==["abc_.+-012"]==])
  set(CASE_CMAKELISTS_NAME_2 [==["abc_.+-012"]==])
  run_ctest(NameContainsValidSpecialChars2)
endfunction()
run_NameContainsValidSpecialChars2_test()

function(run_NameContainsValidSpecialChars3_test)
  set(CASE_CMAKELISTS_NAME_1 [==["abc_.+-012"]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ abc_.+-012 ]==])
  run_ctest(NameContainsValidSpecialChars3)
endfunction()
run_NameContainsValidSpecialChars3_test()

function(run_NameContainsValidSpecialChars4_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ abc_.+-012 ]==])
  set(CASE_CMAKELISTS_NAME_2 [==["abc_.+-012"]==])
  run_ctest(NameContainsValidSpecialChars4)
endfunction()
run_NameContainsValidSpecialChars4_test()


function(run_NameContainsOtherSpecialChars1_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ !§$%&/ü:*😤~ ]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ !§$%&/ü:*😤~ ]==])
  run_ctest(NameContainsOtherSpecialChars1)
endfunction()
run_NameContainsOtherSpecialChars1_test()

function(run_NameContainsOtherSpecialChars2_test)
  set(CASE_CMAKELISTS_NAME_1 [==["!§$%&/ü:*😤~"]==])
  set(CASE_CMAKELISTS_NAME_2 [==["!§$%&/ü:*😤~"]==])
  run_ctest(NameContainsOtherSpecialChars2)
endfunction()
run_NameContainsOtherSpecialChars2_test()

function(run_NameContainsOtherSpecialChars3_test)
  set(CASE_CMAKELISTS_NAME_1 [==["!§$%&/ü:*😤~"]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ !§$%&/ü:*😤~ ]==])
  run_ctest(NameContainsOtherSpecialChars3)
endfunction()
run_NameContainsOtherSpecialChars3_test()

function(run_NameContainsOtherSpecialChars4_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ !§$%&/ü:*😤~ ]==])
  set(CASE_CMAKELISTS_NAME_2 [==["!§$%&/ü:*😤~"]==])
  run_ctest(NameContainsOtherSpecialChars4)
endfunction()
run_NameContainsOtherSpecialChars4_test()


function(run_NameContainsEscapedSpecialChars1_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ \(\)\ \# ]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ \(\)\ \# ]==])
  run_ctest(NameContainsEscapedSpecialChars1)
endfunction()
run_NameContainsEscapedSpecialChars1_test()

function(run_NameContainsEscapedSpecialChars2_test)
  set(CASE_CMAKELISTS_NAME_1 [==["\(\)\ \#"]==])
  set(CASE_CMAKELISTS_NAME_2 [==["\(\)\ \#"]==])
  run_ctest(NameContainsEscapedSpecialChars2)
endfunction()
run_NameContainsEscapedSpecialChars2_test()

function(run_NameContainsEscapedSpecialChars3_test)
  set(CASE_CMAKELISTS_NAME_1 [==["\(\)\ \#"]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ \(\)\ \# ]==])
  run_ctest(NameContainsEscapedSpecialChars3)
endfunction()
run_NameContainsEscapedSpecialChars3_test()

function(run_NameContainsEscapedSpecialChars4_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ \(\)\ \# ]==])
  set(CASE_CMAKELISTS_NAME_2 [==["\(\)\ \#"]==])
  run_ctest(NameContainsEscapedSpecialChars4)
endfunction()
run_NameContainsEscapedSpecialChars4_test()


function(run_NameContainsGeneratorExpressionSyntax1_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ $<BOOL:0> ]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ $<BOOL:0> ]==])
  run_ctest(NameContainsGeneratorExpressionSyntax1)
endfunction()
run_NameContainsGeneratorExpressionSyntax1_test()

function(run_NameContainsGeneratorExpressionSyntax2_test)
  set(CASE_CMAKELISTS_NAME_1 [==["$<BOOL:0>"]==])
  set(CASE_CMAKELISTS_NAME_2 [==["$<BOOL:0>"]==])
  run_ctest(NameContainsGeneratorExpressionSyntax2)
endfunction()
run_NameContainsGeneratorExpressionSyntax2_test()

function(run_NameContainsGeneratorExpressionSyntax3_test)
  set(CASE_CMAKELISTS_NAME_1 [==["$<BOOL:0>"]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ $<BOOL:0> ]==])
  run_ctest(NameContainsGeneratorExpressionSyntax3)
endfunction()
run_NameContainsGeneratorExpressionSyntax3_test()

function(run_NameContainsGeneratorExpressionSyntax4_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ $<BOOL:0> ]==])
  set(CASE_CMAKELISTS_NAME_2 [==["$<BOOL:0>"]==])
  run_ctest(NameContainsGeneratorExpressionSyntax4)
endfunction()
run_NameContainsGeneratorExpressionSyntax4_test()


function(run_NameContainsSpaces1_test)
  set(CASE_CMAKELISTS_NAME_1 [==["PrefixTest SuffixTest"]==])
  set(CASE_CMAKELISTS_NAME_2 [==["PrefixTest SuffixTest"]==])
  run_ctest(NameContainsSpaces1)
endfunction()
run_NameContainsSpaces1_test()

function(run_NameContainsSpaces2_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ PrefixTest SuffixTest ]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ PrefixTest SuffixTest ]==])
  run_ctest(NameContainsSpaces2)
endfunction()
run_NameContainsSpaces2_test()

function(run_NameContainsSpaces3_test)
  set(CASE_CMAKELISTS_NAME_1 [==["PrefixTest SuffixTest"]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ PrefixTest SuffixTest ]==])
  run_ctest(NameContainsSpaces3)
endfunction()
run_NameContainsSpaces3_test()

function(run_NameContainsSpaces4_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ PrefixTest SuffixTest ]==])
  set(CASE_CMAKELISTS_NAME_2 [==["PrefixTest SuffixTest"]==])
  run_ctest(NameContainsSpaces4)
endfunction()
run_NameContainsSpaces4_test()


function(run_NameContainsSemicolon1_test)
  set(CASE_CMAKELISTS_NAME_1 [==["PrefixTest;SuffixTest"]==])
  set(CASE_CMAKELISTS_NAME_2 [==["PrefixTest;SuffixTest"]==])
  run_ctest(NameContainsSemicolon1)
endfunction()
run_NameContainsSemicolon1_test()

function(run_NameContainsSemicolon2_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ PrefixTest;SuffixTest ]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ PrefixTest;SuffixTest ]==])
  run_ctest(NameContainsSemicolon2)
endfunction()
run_NameContainsSemicolon2_test()

function(run_NameContainsSemicolon3_test)
  set(CASE_CMAKELISTS_NAME_1 [==["PrefixTest;SuffixTest"]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ PrefixTest;SuffixTest ]==])
  run_ctest(NameContainsSemicolon3)
endfunction()
run_NameContainsSemicolon3_test()

function(run_NameContainsSemicolon4_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ PrefixTest;SuffixTest ]==])
  set(CASE_CMAKELISTS_NAME_2 [==["PrefixTest;SuffixTest"]==])
  run_ctest(NameContainsSemicolon4)
endfunction()
run_NameContainsSemicolon4_test()


function(run_NameContainsEscapedQuote1_test)
  set(CASE_CMAKELISTS_NAME_1 [==["EscapedQuote\"\"SuffixTest"]==])
  set(CASE_CMAKELISTS_NAME_2 [==["EscapedQuote\"\"SuffixTest"]==])
  run_ctest(NameContainsEscapedQuote1)
endfunction()
run_NameContainsEscapedQuote1_test()

function(run_NameContainsEscapedQuote2_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ EscapedQuote\"\"SuffixTest ]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ EscapedQuote\"\"SuffixTest ]==])
  run_ctest(NameContainsEscapedQuote2)
endfunction()
run_NameContainsEscapedQuote2_test()

function(run_NameContainsEscapedQuote3_test)
  set(CASE_CMAKELISTS_NAME_1 [==["EscapedQuote\"\"SuffixTest"]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ EscapedQuote\"\"SuffixTest ]==])
  run_ctest(NameContainsEscapedQuote3)
endfunction()
run_NameContainsEscapedQuote3_test()

function(run_NameContainsEscapedQuote4_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ EscapedQuote\"\"SuffixTest ]==])
  set(CASE_CMAKELISTS_NAME_2 [==["EscapedQuote\"\"SuffixTest"]==])
  run_ctest(NameContainsEscapedQuote4)
endfunction()
run_NameContainsEscapedQuote4_test()


function(run_NameContainsBracketArgument1_test)
  set(CASE_CMAKELISTS_NAME_1 [==["[=[BracketArgument;SuffixTest]=]"]==])
  set(CASE_CMAKELISTS_NAME_2 [==["[=[BracketArgument;SuffixTest]=]"]==])
  run_ctest(NameContainsBracketArgument1)
endfunction()
run_NameContainsBracketArgument1_test()

function(run_NameContainsBracketArgument2_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ [=[BracketArgument;SuffixTest]=] ]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ [=[BracketArgument;SuffixTest]=] ]==])
  run_ctest(NameContainsBracketArgument2)
endfunction()
run_NameContainsBracketArgument2_test()

function(run_NameContainsBracketArgument3_test)
  set(CASE_CMAKELISTS_NAME_1 [==["[=[BracketArgument;SuffixTest]=]"]==])
  set(CASE_CMAKELISTS_NAME_2 [==[ [=[BracketArgument;SuffixTest]=] ]==])
  run_ctest(NameContainsBracketArgument3)
endfunction()
run_NameContainsBracketArgument3_test()

function(run_NameContainsBracketArgument4_test)
  set(CASE_CMAKELISTS_NAME_1 [==[ [=[BracketArgument;SuffixTest]=] ]==])
  set(CASE_CMAKELISTS_NAME_2 [==["[=[BracketArgument;SuffixTest]=]"]==])
  run_ctest(NameContainsBracketArgument4)
endfunction()
run_NameContainsBracketArgument4_test()