@@ -25,6 +25,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
25
25
echo " Exit status: $status | Expected: $expectedExitStatus "
26
26
[ " $status " -eq $expectedExitStatus ]
27
27
[ " ${# lines[@]} " -eq 1 ]
28
+ outputRegex=" ^WARNING: \./check_library_structure/ValidLibraryOnePointZero is missing a library\.properties file. While not required, it's recommended to add this file to provide helpful metadata\. See: https://github\.com/arduino/Arduino/wiki/Arduino-IDE-1\.5:-Library-specification#library-metadata"
29
+ [[ " ${lines[0]} " =~ $outputRegex ]]
28
30
}
29
31
30
32
@test " check_library_structure \" ./check_library_structure/ValidLibraryOnePointFive\" " {
@@ -49,6 +51,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
49
51
echo " Exit status: $status | Expected: $expectedExitStatus "
50
52
[ " $status " -eq $expectedExitStatus ]
51
53
[ " ${# lines[@]} " -eq 1 ]
54
+ outputRegex=" ^WARNING: \./check_library_structure/InvalidLibraryBelowDepth is missing a library\.properties file\. While not required, it's recommended to add this file to provide helpful metadata\. See: https://github\.com/arduino/Arduino/wiki/Arduino-IDE-1\.5:-Library-specification#library-metadata"
55
+ [[ " ${lines[0]} " =~ $outputRegex ]]
52
56
}
53
57
54
58
@test " check_library_structure \" ./check_library_structure/DoesntExist\" " {
@@ -57,6 +61,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
57
61
echo " Exit status: $status | Expected: $expectedExitStatus "
58
62
[ " $status " -eq $expectedExitStatus ]
59
63
[ " ${# lines[@]} " -eq 1 ]
64
+ outputRegex=" ^ERROR: Specified folder: \./check_library_structure/DoesntExist doesn't exist\."
65
+ [[ " ${lines[0]} " =~ $outputRegex ]]
60
66
}
61
67
62
68
@test " check_library_structure \" ./check_library_structure/IncorrectSrcFolderCase\" " {
@@ -65,6 +71,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
65
71
echo " Exit status: $status | Expected: $expectedExitStatus "
66
72
[ " $status " -eq $expectedExitStatus ]
67
73
[ " ${# lines[@]} " -eq 1 ]
74
+ outputRegex=' ^ERROR: \./check_library_structure/IncorrectSrcFolderCase is a 1\.5 format library with incorrect case in src subfolder name, which causes library to not be recognized on a filename case-sensitive OS such as Linux\.'
75
+ [[ " ${lines[0]} " =~ $outputRegex ]]
68
76
}
69
77
70
78
@test " check_library_structure \" ./check_library_structure/MultipleInvalidLibraries\" 1" {
@@ -73,6 +81,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
73
81
echo " Exit status: $status | Expected: $expectedExitStatus "
74
82
[ " $status " -eq $expectedExitStatus ]
75
83
[ " ${# lines[@]} " -eq 1 ]
84
+ outputRegex=' ^ERROR: \./check_library_structure/MultipleInvalidLibraries/IncorrectSrcFolderCase is a 1\.5 format library with incorrect case in src subfolder name, which causes library to not be recognized on a filename case-sensitive OS such as Linux\.'
85
+ [[ " ${lines[0]} " =~ $outputRegex ]]
76
86
}
77
87
78
88
@test " check_library_structure \" ./check_library_structure/NotLibrary\" " {
@@ -81,6 +91,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
81
91
echo " Exit status: $status | Expected: $expectedExitStatus "
82
92
[ " $status " -eq $expectedExitStatus ]
83
93
[ " ${# lines[@]} " -eq 1 ]
94
+ outputRegex=' ^ERROR: No valid library found in \./check_library_structure/NotLibrary'
95
+ [[ " ${lines[0]} " =~ $outputRegex ]]
84
96
}
85
97
86
98
@test " check_library_structure \" ./check_library_structure/1FolderStartsWithNumber\" " {
@@ -89,8 +101,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
89
101
echo " Exit status: $status | Expected: $expectedExitStatus "
90
102
[ " $status " -eq $expectedExitStatus ]
91
103
[ " ${# lines[@]} " -eq 1 ]
92
- warningRegex =' ^WARNING: Folder name \(.*\) beginning with a number'
93
- [[ " ${lines[0]} " =~ $warningRegex ]]
104
+ outputRegex =' ^WARNING: Discouraged folder name: 1FolderStartsWithNumber\. Folder name beginning with a number is only supported by Arduino IDE 1\.8\.4 and newer\. '
105
+ [[ " ${lines[0]} " =~ $outputRegex ]]
94
106
}
95
107
96
108
@test " check_library_structure \" ./check_library_structure/-FolderStartsWithInvalidCharacter\" " {
@@ -99,6 +111,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
99
111
echo " Exit status: $status | Expected: $expectedExitStatus "
100
112
[ " $status " -eq $expectedExitStatus ]
101
113
[ " ${# lines[@]} " -eq 1 ]
114
+ outputRegex=' ^ERROR: Invalid folder name: -FolderStartsWithInvalidCharacter\. Folder name beginning with a - or \. is not allowed\.'
115
+ [[ " ${lines[0]} " =~ $outputRegex ]]
102
116
}
103
117
104
118
@test " check_library_structure \" ./check_library_structure/Invalid CharactersInFolder\" " {
@@ -107,6 +121,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
107
121
echo " Exit status: $status | Expected: $expectedExitStatus "
108
122
[ " $status " -eq $expectedExitStatus ]
109
123
[ " ${# lines[@]} " -eq 1 ]
124
+ outputRegex=' ^ERROR: Invalid folder name: Invalid CharactersInFolder\. Only letters, numbers, dots, dashes, and underscores are allowed\.'
125
+ [[ " ${lines[0]} " =~ $outputRegex ]]
110
126
}
111
127
112
128
@test " check_library_structure \" ./check_library_structure/FolderNameTooLongasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasd\" " {
@@ -115,6 +131,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
115
131
echo " Exit status: $status | Expected: $expectedExitStatus "
116
132
[ " $status " -eq $expectedExitStatus ]
117
133
[ " ${# lines[@]} " -eq 1 ]
134
+ outputRegex=' ^ERROR: Folder name FolderNameTooLongasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasd exceeds the maximum of 63 characters\.'
135
+ [[ " ${lines[0]} " =~ $outputRegex ]]
118
136
}
119
137
120
138
@test " check_library_structure \" ./check_library_structure/SpuriousDotFolder\" " {
@@ -123,8 +141,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
123
141
echo " Exit status: $status | Expected: $expectedExitStatus "
124
142
[ " $status " -eq $expectedExitStatus ]
125
143
[ " ${# lines[@]} " -eq 1 ]
126
- errorRegex =' ^ERROR: \./check_library_structure/SpuriousDotFolder/\.asdf causes the Arduino IDE to display a spurious folder warning\.'
127
- [[ " ${lines[0]} " =~ $warningRegex ]]
144
+ outputRegex =' ^ERROR: \./check_library_structure/SpuriousDotFolder/\.asdf causes the Arduino IDE to display a spurious folder warning\.'
145
+ [[ " ${lines[0]} " =~ $outputRegex ]]
128
146
}
129
147
130
148
@test " check_library_structure \" ./check_library_structure/IncorrectExtrasFolder\" " {
@@ -133,6 +151,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
133
151
echo " Exit status: $status | Expected: $expectedExitStatus "
134
152
[ " $status " -eq $expectedExitStatus ]
135
153
[ " ${# lines[@]} " -eq 1 ]
154
+ outputRegex=' ^ERROR: \./check_library_structure/IncorrectExtrasFolder has incorrectly spelled extras folder name\. It should be exactly extras\. See: https://github\.com/arduino/Arduino/wiki/Arduino-IDE-1\.5:-Library-specification#extra-documentation'
155
+ [[ " ${lines[0]} " =~ $outputRegex ]]
136
156
}
137
157
138
158
@test " check_library_structure \" ./check_library_structure/IncorrectExamplesFolder\" " {
@@ -141,6 +161,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
141
161
echo " Exit status: $status | Expected: $expectedExitStatus "
142
162
[ " $status " -eq $expectedExitStatus ]
143
163
[ " ${# lines[@]} " -eq 1 ]
164
+ outputRegex=' ^ERROR: \./check_library_structure/IncorrectExamplesFolder has incorrect examples folder name. See: https://github\.com/arduino/Arduino/wiki/Arduino-IDE-1\.5:-Library-specification#library-examples'
165
+ [[ " ${lines[0]} " =~ $outputRegex ]]
144
166
}
145
167
146
168
@test " check_library_structure \" ./check_library_structure/SrcAndUtiltyFolders\" " {
@@ -149,6 +171,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
149
171
echo " Exit status: $status | Expected: $expectedExitStatus "
150
172
[ " $status " -eq $expectedExitStatus ]
151
173
[ " ${# lines[@]} " -eq 1 ]
174
+ outputRegex=' ^ERROR: \./check_library_structure/SrcAndUtiltyFolders is a 1\.5 format library with src and utility folders in library root\. The utility folder should be moved under the src folder\. See: https://github\.com/arduino/Arduino/wiki/Arduino-IDE-1\.5:-Library-specification#source-code'
175
+ [[ " ${lines[0]} " =~ $outputRegex ]]
152
176
}
153
177
154
178
@test " check_library_structure \" ./check_library_structure/MissingLibraryProperties\" " {
@@ -157,8 +181,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
157
181
echo " Exit status: $status | Expected: $expectedExitStatus "
158
182
[ " $status " -eq $expectedExitStatus ]
159
183
[ " ${# lines[@]} " -eq 1 ]
160
- missingLibraryPropertiesWarningRegex= ' ^WARNING: \./check_library_structure/MissingLibraryProperties is missing a library\.properties file\. '
161
- [[ " ${lines[0]} " =~ $missingLibraryPropertiesWarningRegex ]]
184
+ outputRegex= " ^WARNING: \./check_library_structure/MissingLibraryProperties is missing a library\.properties file. While not required, it's recommended to add this file to provide helpful metadata\. See: https://github\.com/arduino/Arduino/wiki/Arduino-IDE-1\.5:-Library-specification#library-metadata "
185
+ [[ " ${lines[0]} " =~ $outputRegex ]]
162
186
}
163
187
164
188
@test " check_library_structure \" ./check_library_structure/StrayLibraryProperties\" " {
@@ -167,6 +191,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
167
191
echo " Exit status: $status | Expected: $expectedExitStatus "
168
192
[ " $status " -eq $expectedExitStatus ]
169
193
[ " ${# lines[@]} " -eq 1 ]
194
+ outputRegex=' ^ERROR: \./check_library_structure/StrayLibraryProperties/src/library\.properties is a stray file\. library\.properties should be located in the library root folder\.'
195
+ [[ " ${lines[0]} " =~ $outputRegex ]]
170
196
}
171
197
172
198
@test " check_library_structure \" ./check_library_structure/MissingKeywordsTxt\" " {
@@ -175,8 +201,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
175
201
echo " Exit status: $status | Expected: $expectedExitStatus "
176
202
[ " $status " -eq $expectedExitStatus ]
177
203
[ " ${# lines[@]} " -eq 1 ]
178
- missingKeywordsTxtWarningRegex= ' ^WARNING: \./check_library_structure/MissingKeywordsTxt is missing a keywords\.txt file\.'
179
- [[ " ${lines[0]} " =~ $missingKeywordsTxtWarningRegex ]]
204
+ outputRegex= " ^WARNING: \./check_library_structure/MissingKeywordsTxt is missing a keywords\.txt file\. While not required, it's recommended to add this file to provide keyword highlighting in the Arduino IDE\. See: https://github\.com/arduino/Arduino/wiki/Arduino-IDE-1\.5:-Library-specification#keywords "
205
+ [[ " ${lines[0]} " =~ $outputRegex ]]
180
206
}
181
207
182
208
@test " check_library_structure \" ./check_library_structure/StrayKeywordsTxt\" " {
@@ -185,6 +211,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
185
211
echo " Exit status: $status | Expected: $expectedExitStatus "
186
212
[ " $status " -eq $expectedExitStatus ]
187
213
[ " ${# lines[@]} " -eq 1 ]
214
+ outputRegex=' ^'
215
+ [[ " ${lines[0]} " =~ $outputRegex ]]
188
216
}
189
217
190
218
@test " check_library_structure \" ./check_library_structure/SketchOutsideExamples\" " {
@@ -193,6 +221,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
193
221
echo " Exit status: $status | Expected: $expectedExitStatus "
194
222
[ " $status " -eq $expectedExitStatus ]
195
223
[ " ${# lines[@]} " -eq 1 ]
224
+ outputRegex=' ^'
225
+ [[ " ${lines[0]} " =~ $outputRegex ]]
196
226
}
197
227
198
228
# check_sketch_structure
@@ -203,6 +233,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
203
233
echo " Exit status: $status | Expected: $expectedExitStatus "
204
234
[ " $status " -eq $expectedExitStatus ]
205
235
[ " ${# lines[@]} " -eq 1 ]
236
+ outputRegex=' ^'
237
+ [[ " ${lines[0]} " =~ $outputRegex ]]
206
238
}
207
239
208
240
@test " check_sketch_structure \" ./check_library_structure/PdeSketchExtension\" " {
@@ -211,8 +243,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
211
243
echo " Exit status: $status | Expected: $expectedExitStatus "
212
244
[ " $status " -eq $expectedExitStatus ]
213
245
[ " ${# lines[@]} " -eq 1 ]
214
- pdeWarningRegex =' ^WARNING: File .* uses the \.pde extension '
215
- [[ " ${lines[0]} " =~ $pdeWarningRegex ]]
246
+ outputRegex =' ^'
247
+ [[ " ${lines[0]} " =~ $outputRegex ]]
216
248
}
217
249
218
250
@test " check_sketch_structure \" ./check_library_structure/IncorrectSketchExtensionCase\" " {
@@ -221,6 +253,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
221
253
echo " Exit status: $status | Expected: $expectedExitStatus "
222
254
[ " $status " -eq $expectedExitStatus ]
223
255
[ " ${# lines[@]} " -eq 1 ]
256
+ outputRegex=' ^'
257
+ [[ " ${lines[0]} " =~ $outputRegex ]]
224
258
}
225
259
226
260
@test " check_library_structure \" ./check_library_structure/IncorrectSketchExtensionCase\" " {
@@ -229,6 +263,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
229
263
echo " Exit status: $status | Expected: $expectedExitStatus "
230
264
[ " $status " -eq $expectedExitStatus ]
231
265
[ " ${# lines[@]} " -eq 1 ]
266
+ outputRegex=' ^'
267
+ [[ " ${lines[0]} " =~ $outputRegex ]]
232
268
}
233
269
234
270
@test " check_sketch_structure \" ./check_library_structure/SketchFolderStartsWithNumber\" " {
@@ -237,8 +273,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
237
273
echo " Exit status: $status | Expected: $expectedExitStatus "
238
274
[ " $status " -eq $expectedExitStatus ]
239
275
[ " ${# lines[@]} " -eq 1 ]
240
- warningRegex =' ^WARNING: Folder name \(.*\) beginning with a number '
241
- [[ " ${lines[0]} " =~ $warningRegex ]]
276
+ outputRegex =' ^'
277
+ [[ " ${lines[0]} " =~ $outputRegex ]]
242
278
}
243
279
244
280
@test " check_sketch_structure \" ./check_library_structure/InvalidCharactersAtStartOfSketchFolder\" " {
@@ -247,6 +283,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
247
283
echo " Exit status: $status | Expected: $expectedExitStatus "
248
284
[ " $status " -eq $expectedExitStatus ]
249
285
[ " ${# lines[@]} " -eq 1 ]
286
+ outputRegex=' ^'
287
+ [[ " ${lines[0]} " =~ $outputRegex ]]
250
288
}
251
289
252
290
@test " check_library_structure \" ./check_library_structure/InvalidCharactersAtStartOfSketchFolder\" " {
@@ -255,6 +293,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
255
293
echo " Exit status: $status | Expected: $expectedExitStatus "
256
294
[ " $status " -eq $expectedExitStatus ]
257
295
[ " ${# lines[@]} " -eq 1 ]
296
+ outputRegex=' ^'
297
+ [[ " ${lines[0]} " =~ $outputRegex ]]
258
298
}
259
299
260
300
@test " check_sketch_structure \" ./check_library_structure/InvalidCharactersInSketchFolder\" " {
@@ -263,6 +303,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
263
303
echo " Exit status: $status | Expected: $expectedExitStatus "
264
304
[ " $status " -eq $expectedExitStatus ]
265
305
[ " ${# lines[@]} " -eq 1 ]
306
+ outputRegex=' ^'
307
+ [[ " ${lines[0]} " =~ $outputRegex ]]
266
308
}
267
309
268
310
@test " check_library_structure \" ./check_library_structure/InvalidCharactersInSketchFolder\" " {
@@ -271,6 +313,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
271
313
echo " Exit status: $status | Expected: $expectedExitStatus "
272
314
[ " $status " -eq $expectedExitStatus ]
273
315
[ " ${# lines[@]} " -eq 1 ]
316
+ outputRegex=' ^ERROR: Invalid folder name: example 1\. Only letters, numbers, dots, dashes, and underscores are allowed\.'
317
+ [[ " ${lines[0]} " =~ $outputRegex ]]
274
318
}
275
319
276
320
@test " check_sketch_structure \" ./check_library_structure/SketchFolderNameTooLong\" " {
@@ -279,6 +323,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
279
323
echo " Exit status: $status | Expected: $expectedExitStatus "
280
324
[ " $status " -eq $expectedExitStatus ]
281
325
[ " ${# lines[@]} " -eq 1 ]
326
+ outputRegex=' ^ERROR: Folder name asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf exceeds the maximum of 63 characters\.'
327
+ [[ " ${lines[0]} " =~ $outputRegex ]]
282
328
}
283
329
284
330
@test " check_library_structure \" ./check_library_structure/SketchFolderNameTooLong\" " {
@@ -287,6 +333,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
287
333
echo " Exit status: $status | Expected: $expectedExitStatus "
288
334
[ " $status " -eq $expectedExitStatus ]
289
335
[ " ${# lines[@]} " -eq 1 ]
336
+ outputRegex=' ^ERROR: Folder name asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf exceeds the maximum of 63 characters\.'
337
+ [[ " ${lines[0]} " =~ $outputRegex ]]
290
338
}
291
339
292
340
@test " check_sketch_structure \" ./check_library_structure/SketchFolderNameTooLongExtras\" " {
@@ -295,6 +343,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
295
343
echo " Exit status: $status | Expected: $expectedExitStatus "
296
344
[ " $status " -eq $expectedExitStatus ]
297
345
[ " ${# lines[@]} " -eq 1 ]
346
+ outputRegex=' ^ERROR: Folder name asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf exceeds the maximum of 63 characters\.'
347
+ [[ " ${lines[0]} " =~ $outputRegex ]]
298
348
}
299
349
300
350
@test " check_library_structure \" ./check_library_structure/SketchFolderNameTooLongExtras\" " {
@@ -303,6 +353,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
303
353
echo " Exit status: $status | Expected: $expectedExitStatus "
304
354
[ " $status " -eq $expectedExitStatus ]
305
355
[ " ${# lines[@]} " -eq 1 ]
356
+ outputRegex=' ^ERROR: Folder name asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf exceeds the maximum of 63 characters\.'
357
+ [[ " ${lines[0]} " =~ $outputRegex ]]
306
358
}
307
359
308
360
@test " check_sketch_structure \" ./check_library_structure/SketchFolderNameMismatch\" " {
@@ -311,6 +363,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
311
363
echo " Exit status: $status | Expected: $expectedExitStatus "
312
364
[ " $status " -eq $expectedExitStatus ]
313
365
[ " ${# lines[@]} " -eq 1 ]
366
+ outputRegex=' ^ERROR: Sketch folder name \./check_library_structure/SketchFolderNameMismatch/examples/example1 does not match the sketch filename\.'
367
+ [[ " ${lines[0]} " =~ $outputRegex ]]
314
368
}
315
369
316
370
@test " check_library_structure \" ./check_library_structure/SketchFolderNameMismatch\" " {
@@ -319,6 +373,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
319
373
echo " Exit status: $status | Expected: $expectedExitStatus "
320
374
[ " $status " -eq $expectedExitStatus ]
321
375
[ " ${# lines[@]} " -eq 1 ]
376
+ outputRegex=' ^ERROR: Sketch folder name \./check_library_structure/SketchFolderNameMismatch/examples/example1 does not match the sketch filename\.'
377
+ [[ " ${lines[0]} " =~ $outputRegex ]]
322
378
}
323
379
324
380
@test " check_sketch_structure \" ./check_library_structure/MultipleSketchesInSameFolderUnix\" " {
@@ -327,6 +383,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
327
383
echo " Exit status: $status | Expected: $expectedExitStatus "
328
384
[ " $status " -eq $expectedExitStatus ]
329
385
[ " ${# lines[@]} " -eq 1 ]
386
+ outputRegex=' ^ERROR: Multiple sketches found in the same folder \(\./check_library_structure/MultipleSketchesInSameFolderUnix/examples/example1\)\.'
387
+ [[ " ${lines[0]} " =~ $outputRegex ]]
330
388
}
331
389
332
390
@test " check_library_structure \" ./check_library_structure/MultipleSketchesInSameFolderUnix\" " {
@@ -335,6 +393,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
335
393
echo " Exit status: $status | Expected: $expectedExitStatus "
336
394
[ " $status " -eq $expectedExitStatus ]
337
395
[ " ${# lines[@]} " -eq 1 ]
396
+ outputRegex=' ^ERROR: Multiple sketches found in the same folder \(\./check_library_structure/MultipleSketchesInSameFolderUnix/examples/example1\)\.'
397
+ [[ " ${lines[0]} " =~ $outputRegex ]]
338
398
}
339
399
340
400
@test " check_sketch_structure \" ./check_library_structure/MultipleSketchesInSameFolderMac\" " {
@@ -343,6 +403,8 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
343
403
echo " Exit status: $status | Expected: $expectedExitStatus "
344
404
[ " $status " -eq $expectedExitStatus ]
345
405
[ " ${# lines[@]} " -eq 1 ]
406
+ outputRegex=' ^ERROR: Multiple sketches found in the same folder \(\./check_library_structure/MultipleSketchesInSameFolderMac/examples/example1\)\.'
407
+ [[ " ${lines[0]} " =~ $outputRegex ]]
346
408
}
347
409
348
410
@test " check_library_structure \" ./check_library_structure/MultipleSketchesInSameFolderMac\" " {
@@ -351,4 +413,6 @@ TESTS_BATS_APPLICATION_FOLDER="$APPLICATION_FOLDER"
351
413
echo " Exit status: $status | Expected: $expectedExitStatus "
352
414
[ " $status " -eq $expectedExitStatus ]
353
415
[ " ${# lines[@]} " -eq 1 ]
416
+ outputRegex=' ^ERROR: Multiple sketches found in the same folder \(\./check_library_structure/MultipleSketchesInSameFolderMac/examples/example1\)\.'
417
+ [[ " ${lines[0]} " =~ $outputRegex ]]
354
418
}
0 commit comments