mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
fix: dependency scan ignores folders above the game folder (#859)
This commit is contained in:
1 parent
d3b0b8e51c
commit
9e7b4c0b50
2 files changed
+19
-1
No files matched your search
@@ -0,0 +1,18 @@
|
||||
package com.droiddeck.launcher.frontend
|
||||
|
||||
import java.io.File
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.rules.TemporaryFolder
|
||||
|
||||
class DependencyDetectorTest {
|
||||
@get:Rule val tmp = TemporaryFolder()
|
||||
|
||||
@Test fun foldersAboveTheGameDoNotChangeWhatIsFound() {
|
||||
val folder = File(tmp.newFolder("Games 2005", "agility"), "Game")
|
||||
File(folder, "_CommonRedist/vcredist/2013").mkdirs()
|
||||
File(folder, "_CommonRedist/vcredist/2013/vcredist_x64.exe").writeText("x")
|
||||
assertEquals(listOf("vcredist2013"), DependencyDetector.detect(folder).map { it.componentName })
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user