Recently Written · git

ink-dim

Ink Dim: tap to set the frontlight of a Viwoods AiPaper reader below the lowest system level. Tap again to go back.

git clone https://github.com/equwal/ink-dim

Log | Files | Refs


app/src/test/java/dev/equwal/inkdim/MoreAppsTest.kt (1014 bytes)

1 // SPDX-License-Identifier: GPL-3.0-or-later
2 // Copyright (c) 2026 equwal
3 package dev.equwal.inkdim
4 
5 import org.junit.Assert.assertEquals
6 import org.junit.Assert.assertFalse
7 import org.junit.Assert.assertTrue
8 import org.junit.Test
9 
10 /** Tests for the list of the More apps section. */
11 class MoreAppsTest {
12 
13     @Test fun `the list leaves out Ink Dim`() {
14         assertFalse(MoreApps.ALL.any { it.name == "Ink Dim" || "equwal/ink-dim" in it.url })
15     }
16 
17     @Test fun `each link opens an https page`() {
18         for (app in MoreApps.ALL) assertTrue(app.url, app.url.startsWith("https://"))
19     }
20 
21     @Test fun `the list keeps the order of the catalog`() {
22         assertEquals(
23             listOf("SubRead", "Book Simulator", "honjimaku.com", "sbm Sync"),
24             MoreApps.ALL.take(4).map { it.name }
25         )
26         assertEquals("All projects", MoreApps.ALL.last().name)
27         // The catalog has 15 entries. Ink Dim is the one that is not in the list.
28         assertEquals(14, MoreApps.ALL.size)
29     }
30 }