0.99.15: hand-run playback test (Beerus), and the revised Afterburn premiere proposal
Plays one episode in Orbit's own player via MainActivity's orbit_play_test extra, in a separate non-exported activity; books nothing, reports nothing to Emby, ends by itself. Booking fingerprints identical to 0.99.14. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package tv.orbit.classic
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Test
|
||||
|
||||
class PlaybackTestTest {
|
||||
@Test fun labelsAreShortAndSafe() {
|
||||
assertEquals("text/x-ssa", playTestLabel("text/x-ssa"))
|
||||
assertEquals("jpn", playTestLabel("jpn"))
|
||||
assertEquals("unknown", playTestLabel(null))
|
||||
for (hostile in listOf("https://host/stream?api_key=SECRET", "/mnt/media/Beerus.mkv", "media/anime/Beerus.mkv", "Japanese (Crunchyroll)", "a".repeat(41))) assertEquals("unknown", playTestLabel(hostile))
|
||||
}
|
||||
|
||||
@Test fun theSummaryHoldsFormatsAndCountsOnly() {
|
||||
val record = PlaybackTestRecord().apply {
|
||||
ready = true; firstFrame = true; video = "video/avc 1920x1080"; audio = "audio/mp4a-latm jpn 2ch"
|
||||
subtitles = listOf("text/x-ssa eng selected", "text/x-ssa por"); subtitleSelected = "eng"; cueUpdates = 41; firstCueMs = 12_345
|
||||
}
|
||||
assertEquals("playtest result ready=true firstFrame=true video=video/avc 1920x1080 audio=audio/mp4a-latm jpn 2ch subtitles=2[text/x-ssa eng selected, text/x-ssa por]" +
|
||||
" subtitleSelected=eng cueUpdates=41 firstCuePositionMs=12345 errors=0", record.summary())
|
||||
assertFalse(PlaybackTestRecord().summary().contains("null"))
|
||||
}
|
||||
|
||||
@Test fun englishIsChosenTheWayOrbitChoosesIt() {
|
||||
// The test asks for subtitles as Orbit's setting does: English where there is some, whatever the track order.
|
||||
assertEquals(2, subtitleFor(SUBTITLES_BY_DEFAULT, listOf("por", "spa", "eng")))
|
||||
assertEquals(null, subtitleFor(null, listOf("eng")))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user