- Host discovers/builds modules under modules/ (bbc, rte, tg4) - module-publish.yaml tracked; local module.yaml gitignored - drm --modules-dir / DRM_MODULES_DIR - drm proxy reset; Magisk reinject reliability - modules-v* Forgejo release workflow + build scripts - BBC full Explore channel map including S4C - README quickstart based on release binaries
39 lines
1 KiB
Go
39 lines
1 KiB
Go
package main
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"drmdecryption/apps/capture/capturecmd"
|
|
)
|
|
|
|
func TestCaptureRejectsChannelAsApp(t *testing.T) {
|
|
err := capturecmd.Run([]string{"--app", "bbcone"})
|
|
if err == nil {
|
|
t.Fatal("expected error for --app bbcone")
|
|
}
|
|
if !strings.Contains(err.Error(), "--app bbc") || !strings.Contains(err.Error(), "--channel bbcone") {
|
|
t.Fatalf("want suggestion for bbc/bbcone, got: %v", err)
|
|
}
|
|
}
|
|
|
|
func TestCaptureRejectsLeftoverArgs(t *testing.T) {
|
|
err := capturecmd.Run([]string{"--app", "bbc", "bbcone"})
|
|
if err == nil {
|
|
t.Fatal("expected error for leftover positional args")
|
|
}
|
|
if !strings.Contains(err.Error(), "unexpected arguments") {
|
|
t.Fatalf("got: %v", err)
|
|
}
|
|
}
|
|
|
|
func TestCaptureNormalizesEmDashThenSuggestsChannel(t *testing.T) {
|
|
// Word/Terminal often turns -- into an em dash: capture —app bbcone
|
|
err := capturecmd.Run([]string{"\u2014app", "bbcone"})
|
|
if err == nil {
|
|
t.Fatal("expected error")
|
|
}
|
|
if !strings.Contains(err.Error(), "--app bbc") {
|
|
t.Fatalf("got: %v", err)
|
|
}
|
|
}
|