summaryrefslogtreecommitdiff
path: root/internal/flags/flags_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-02 08:46:56 +0200
committerPaul Buetow <paul@buetow.org>2026-03-02 08:46:56 +0200
commit717cf6a47cd19cc284b023825a3bac3272ebe171 (patch)
tree5be553754917157311d107538a99e34b2f8aa839 /internal/flags/flags_test.go
parentb3327d17f9f5c7080b05d6d5457cf25550d40ad9 (diff)
Make --open a command template with no defaults
Diffstat (limited to 'internal/flags/flags_test.go')
-rw-r--r--internal/flags/flags_test.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/internal/flags/flags_test.go b/internal/flags/flags_test.go
index 3fa74c6..32af4bd 100644
--- a/internal/flags/flags_test.go
+++ b/internal/flags/flags_test.go
@@ -69,9 +69,6 @@ func TestParseLiveFlagsAndInterval(t *testing.T) {
if got := int(pidFilter.Load()); got != 1234 {
t.Fatalf("global pid filter = %d, want 1234", got)
}
- if cfg.OpenLiveBrowser {
- t.Fatalf("expected open-live disabled by default")
- }
if cfg.OpenCommand != "" {
t.Fatalf("expected empty open command by default")
}
@@ -89,25 +86,19 @@ func TestParseLiveDefaults(t *testing.T) {
if cfg.LiveInterval != 200*time.Millisecond {
t.Fatalf("default live interval = %v, want %v", cfg.LiveInterval, 200*time.Millisecond)
}
- if cfg.OpenLiveBrowser {
- t.Fatalf("expected open-live disabled by default")
- }
if cfg.OpenCommand != "" {
t.Fatalf("expected empty open command by default")
}
}
func TestParseOpenFlags(t *testing.T) {
- cfg, err := parseForTest(t, "-live", "-open", "-open-cmd", "chromium --new-window")
+ cfg, err := parseForTest(t, "-live", "-open", "chromium --new-window")
if err != nil {
t.Fatalf("parse returned error: %v", err)
}
if !cfg.LiveFlamegraph {
t.Fatalf("expected live mode enabled")
}
- if !cfg.OpenLiveBrowser {
- t.Fatalf("expected -open to enable live browser open")
- }
if cfg.OpenCommand != "chromium --new-window" {
t.Fatalf("open command = %q, want %q", cfg.OpenCommand, "chromium --new-window")
}