@@ -7,12 +7,11 @@ import io.github.kscripting.shell.model.OsType
77import io.github.kscripting.shell.model.readText
88import io.github.kscripting.shell.model.toNativeFile
99import org.junit.jupiter.api.BeforeEach
10- import org.junit.jupiter.api.Disabled
1110import org.junit.jupiter.api.Test
1211import org.apache.commons.io.FileUtils as ApacheFileUtils
1312
1413class FileUtilsTest {
15- private val path = OsPath .createOrThrow(OsType .native, " build/tmp/file_utils_test" )
14+ private val path = OsPath .createOrThrow(OsType .native, " ./ build/tmp/file_utils_test" )
1615 private val newFile1 = path.resolve(" test1.txt" )
1716 private val newFile2 = path.resolve(" test2.txt" )
1817 private val newFile3 = path.resolve(" firstDir" , " secondDir" , " test3.txt" )
@@ -31,8 +30,6 @@ class FileUtilsTest {
3130 }
3231
3332 @Test
34- // TODO: re-enable it
35- @Disabled
3633 fun `Test symlink file` () {
3734 FileUtils .createFile(newFile1, content1)
3835 FileUtils .symLinkOrCopy(newFile2, newFile1)
@@ -41,8 +38,6 @@ class FileUtilsTest {
4138 }
4239
4340 @Test
44- // TODO: re-enable it
45- @Disabled
4641 fun `Create dirs if needed` () {
4742 FileUtils .createFile(newFile3, content1)
4843 FileUtils .symLinkOrCopy(newFile4, newFile3)
@@ -53,8 +48,9 @@ class FileUtilsTest {
5348 @Test
5449 fun `Assert that getArtifactsRecursively finds all the artifacts in the path` () {
5550 val artifactsPath = OsPath .createOrThrow(OsType .native, " test/resources/config/jars/" )
51+ val supportedExtensions = listOf (" jar" , " aar" )
5652
57- assertThat(FileUtils .getArtifactsRecursively(artifactsPath)).transform {
53+ assertThat(FileUtils .getArtifactsRecursively(artifactsPath, supportedExtensions )).transform {
5854 it.map { it.stringPath().substringAfterLast(" jars" ).replace(" \\ " , " /" ) }
5955 }.isEqualTo(listOf (" /jar_file_1.jar" , " /subdir/jar_file_2.jar" ))
6056 }
0 commit comments