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>
16 lines
466 B
Go
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")
|
|
}
|
|
}
|