Files
Reims-Go/internal/driver/storage_test.go
NwflowerandClaude Opus 5.5 b203bde650 refactor: merge duplicated helpers and the window event contract
Events to the frontend go through App.emit, and a test keeps their names
in step with wails.ts. QEMU argument splitting, hidden console processes,
the macOS release record, the running check and a few smaller helpers
now exist once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 21:09:19 -07:00

16 lines
466 B
Go

package driver
import "testing"
func TestValidateSnapshotName(t *testing.T) {
if got, err := ValidateSnapshotName(" before-ota-26.2 "); err != nil || got != "before-ota-26.2" {
t.Fatalf("valid name failed: %q %v", got, err)
}
if _, err := ValidateSnapshotName(" "); err == nil {
t.Fatal("expected error for empty snapshot name")
}
if _, err := ValidateSnapshotName(`bad"quote`); err == nil {
t.Fatal("expected error for quote in snapshot name")
}
}