diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-26 23:33:55 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-26 23:33:55 +0200 |
| commit | 4ca34f040203c8e31603bbb39fd38632b68067d8 (patch) | |
| tree | eed81b39e169eb6d0cd7d2eca6b338c7c0914ba4 /internal/ior_mode_test.go | |
| parent | e5cb5db2292ae84680935767d455a777125e0fe9 (diff) | |
tui: add paused stream CSV export and foreground editor open
Diffstat (limited to 'internal/ior_mode_test.go')
| -rw-r--r-- | internal/ior_mode_test.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/internal/ior_mode_test.go b/internal/ior_mode_test.go index 84ff651..42b0a48 100644 --- a/internal/ior_mode_test.go +++ b/internal/ior_mode_test.go @@ -36,6 +36,31 @@ func TestShouldRunTraceMode(t *testing.T) { } } +func TestShouldAutoStopByDuration(t *testing.T) { + base := flags.Flags{} + if shouldAutoStopByDuration(base) { + t.Fatalf("expected default TUI mode not to auto-stop by duration") + } + + withPlain := base + withPlain.PlainMode = true + if !shouldAutoStopByDuration(withPlain) { + t.Fatalf("expected plain mode to auto-stop by duration") + } + + withFlamegraph := base + withFlamegraph.FlamegraphEnable = true + if !shouldAutoStopByDuration(withFlamegraph) { + t.Fatalf("expected flamegraph mode to auto-stop by duration") + } + + withPprof := base + withPprof.PprofEnable = true + if !shouldAutoStopByDuration(withPprof) { + t.Fatalf("expected pprof mode to auto-stop by duration") + } +} + func TestDispatchRunUsesTraceModeWhenRequested(t *testing.T) { origRunTrace := runTraceFn origRunTUI := runTUIFn |
