Add a test for the 500-char changelog limit

Both F-Droid and Google Play cap release notes at 500 characters. Check every
metadata changelog in the unit test suite (which CI already runs), and trim the
two old Flutter changelogs that were over the limit.
This commit is contained in:
austinried
2026-10-04 00:30:08 +00:00
parent 3ead9f6fb6
commit 4bf34ea20a
3 changed files with 44 additions and 19 deletions
@@ -0,0 +1,33 @@
package com.subtracks.metadata
import org.junit.Assert.assertTrue
import org.junit.Test
import java.io.File
class ChangelogTest {
@Test
fun changelogsFitStoreLimit() {
val root =
generateSequence(File(".").canonicalFile) { it.parentFile }
.first { File(it, "settings.gradle.kts").isFile }
val files =
File(root, "metadata")
.listFiles()
.orEmpty()
.flatMap { locale -> File(locale, "changelogs").listFiles().orEmpty().toList() }
.filter { it.isFile && it.extension == "txt" }
assertTrue("no changelog files found under metadata/", files.isNotEmpty())
files.forEach { file ->
val text = file.readText()
val length = text.codePointCount(0, text.length)
assertTrue(
"metadata changelogs must be at most $LIMIT characters; ${file.name} is $length",
length <= LIMIT,
)
}
}
private companion object {
const val LIMIT = 500
}
}
+6 -10
View File
@@ -1,12 +1,8 @@
## New Top Songs now falls back to searching songs by the artist and sorting by play count or rating if the server has no getTopSongs endpoint.
* Top Songs in the Artist view now tries to fallback to searching for songs by the artist and sorting by play count/rating if the server doesn't support the getTopSongs endpoint Images download in the background and, since the cache layout changed, redownload once after updating.
* Images are now downloaded in the background via the Android DownloadManager and won't be corrupted if the app is closed
* Note: the cache file structure has been changed, so all images will be erased on update and new images will be downloaded as normal
## Fixed - Fixed screens under the status bar on some devices (#83)
- Fixed occasional pausing after a few tracks (#66)
* Fixed some screens displaying under the status bar on certain devices (#83) - Repeat mode now persists after skipping (#56)
* Fixed occasional pausing after playing a few tracks (#66) - Search keeps its query when going back from the results
* Fixed repeat mode not being persisted after skipping tracks (#56)
* Search no longer clears the query when going back from the "more" results screen
+5 -9
View File
@@ -1,10 +1,6 @@
**Full Changelog**: https://github.com/austinried/subtracks/compare/v1.2.0...v1.3.0 Full changelog: https://github.com/austinried/subtracks/compare/v1.2.0...v1.3.0
## What's Changed Localization support, with 9 new languages: Catalan, Chinese (Simplified), Danish, French, German, Italian, Japanese, Norwegian Bokmål and Russian. Thanks to @comradekingu, @clyhtsuriva, @nortio, @retiolus, @hillwah, @shoddysheep and Weblate contributors.
### New
* Localization support by @austinried in https://github.com/austinried/subtracks/pull/99 - Remove the unused CHECK_LICENSE permission
* 9 new languages: Catalan, Chinese (Simplified), Danish, French, German, Italian, Japanese, Norwegian Bokmål, Russian - Fix a performance issue and crash with large playlists
* Thanks to @comradekingu, @clyhtsuriva, @nortio, @retiolus, @hillwah, @shoddysheep and more users from @weblate!
### Fixed
* Remove unused CHECK_LICENSE permission by @austinried in https://github.com/austinried/subtracks/pull/109
* Fix performance issue/crash with large playlists by @austinried in https://github.com/austinried/subtracks/pull/111