App 2.19.3: update log on the Logs tab
Every update and install step, with the platform's own result, kept across the restart an install causes, so a failed install on the car can be read off the screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package com.evsuite.abrp;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/** The update log's line handling — pure JVM. */
|
||||
public class UpdateLogTest {
|
||||
|
||||
@Test
|
||||
public void newestComesFirstAndTheOldestFallsOff() {
|
||||
List<String> lines = UpdateLog.append(Arrays.asList("b", "a"), "c", 2);
|
||||
assertEquals(Arrays.asList("c", "b"), lines);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void aMultiLinePlatformMessageStaysOneLine() {
|
||||
List<String> lines = UpdateLog.append(Collections.emptyList(), "failed:\nINSTALL_X\r", 10);
|
||||
assertEquals(Collections.singletonList("failed: INSTALL_X "), lines);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user