Default Log

This commit is contained in:
chk
2026-06-14 12:47:12 +02:00
parent 988e8ec752
commit e6abe047dc
3 changed files with 31 additions and 25 deletions

View File

@@ -52,7 +52,7 @@ test('Playback: stepping liefert driver-native (Radian) Zeilen, Grenzen werfen',
expect(() => a.next()).toThrow(); // über das Ende → CURSOR_OUT_OF_RANGE
});
test('Cursor wird beim Speichern als !-Kommentar abgelegt (genau eine Zeile)', async () => {
test('Cursor liegt im .json-Sidecar, .gcode bleibt sauber (kein !-Marker)', async () => {
await store.write('cur_1', {
name: 'Cur',
lines: [
@@ -66,9 +66,13 @@ test('Cursor wird beim Speichern als !-Kommentar abgelegt (genau eine Zeile)', a
await a.appendLine('G4 P0.1'); // persistiert, cursor → 2
const prog = await store.read('cur_1');
// .gcode-Zeilen sind sauber — kein '!'-Marker
const marked = prog.lines.filter(units.hasCursorMarker);
expect(marked).toHaveLength(1);
expect(units.splitComment(marked[0]).code).toBe('G4 P0.1');
expect(marked).toHaveLength(0);
// Cursor steht im .json-Sidecar
expect(prog.cursor).toBe(2);
// Korrekte Zeile am Ende
expect(units.splitComment(prog.lines[2]).code).toBe('G4 P0.1');
});
test('Stepping ohne aktives Programm → NO_ACTIVE_PROGRAM', async () => {