File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import org.jetbrains.spek.api.dsl.given
14
14
import org.jetbrains.spek.api.dsl.it
15
15
import java.io.File
16
16
import kotlin.test.assertEquals
17
+ import kotlin.test.assertNotEquals
17
18
18
19
const val LANG_SAMPLES_PATH = " src/test/resources/samples/"
19
20
@@ -27,17 +28,21 @@ fun assertLang(file: File, expectedLang: String) {
27
28
28
29
val actualLang = diffFile.language
29
30
30
- // TODO(anatoly): Verify all sample files from ignored list.
31
31
// TODO(anatoly): Add support for all languages of samples.
32
+ var todoSample = false ;
32
33
for (wc in ignoredSamplesWildcards) {
33
34
if (FilenameUtils .wildcardMatchOnSystem(file.path, wc)) {
34
- Logger .debug { " -> File: ${file.absolutePath} . " +
35
- " Expected: <$expectedLang >, actual: <$actualLang >" }
36
- return
35
+ todoSample = true
36
+ break
37
37
}
38
38
}
39
39
40
- assertEquals(expectedLang, actualLang, " Unexpected lang for ${file.path} " )
40
+ if (todoSample) {
41
+ assertNotEquals(expectedLang, actualLang, " Unexpected lang for ${file.path} " )
42
+ }
43
+ else {
44
+ assertEquals(expectedLang, actualLang, " Unexpected lang for ${file.path} " )
45
+ }
41
46
}
42
47
43
48
class HeuristicsTest : Spek ({
Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ var ignoredSamplesWildcards = listOf(
54
54
" */CMake/*" ,
55
55
" */COBOL/*" ,
56
56
" */CSON/*" ,
57
- " */CSS/*" ,
58
57
" */CSV/*" ,
59
58
" */CWeb/*" ,
60
59
" */CartoCSS/*" ,
@@ -314,7 +313,6 @@ var ignoredSamplesWildcards = listOf(
314
313
" */Rebol/*" ,
315
314
" */Red/*" ,
316
315
" */Regular Expression/*" ,
317
- " */Ren'Py/*" ,
318
316
" */RenderScript/*" ,
319
317
" */Ring/*" ,
320
318
" */RobotFramework/*" ,
You can’t perform that action at this time.
0 commit comments