mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 05:46:03 +00:00
fix: report archive storage accurately
This commit is contained in:
1 parent
8858285d13
commit
2229dbc0a8
4 files changed
+52
-2
No files matched your search
@@ -237,6 +237,15 @@ class ItchStagingTest {
|
||||
assertEquals("user settings", File(game, "profiles/settings.ini").readText())
|
||||
}
|
||||
|
||||
@Test fun extractedPayloadAndBackupExtraSpaceAreAddedWithoutOverflow() {
|
||||
val stage = tmp.newFolder("space-stage")
|
||||
file(stage, "profiles/default.ini", "1234567890")
|
||||
file(stage, "saves/default.sav", "")
|
||||
assertEquals(10L, ItchStaging.regularFileBytes(stage))
|
||||
assertEquals(38L, ItchStaging.additionalBytesRequired(10L, 28L))
|
||||
assertEquals(Long.MAX_VALUE, ItchStaging.additionalBytesRequired(Long.MAX_VALUE - 1, 2))
|
||||
}
|
||||
|
||||
@Test fun aDoneJournalEntryIsRehashedBeforeResumeSkipsIt() {
|
||||
val game = tmp.newFolder("corrupt-resume-game")
|
||||
val staged = tmp.newFolder("corrupt-resume-stage")
|
||||
|
||||
Reference in new issue
Block a user