返回 DeepSeek-Reasonix
command_test.go
根目录 / internal / proc / command_test.go
1 package proc
2
3 import (
4 "context"
5 "testing"
6 )
7
8 func TestCommandConstructorsPreserveArguments(t *testing.T) {
9 background := Command("reasonix-helper", "--probe", "a b")
10 if len(background.Args) != 3 || background.Args[1] != "--probe" || background.Args[2] != "a b" {
11 t.Fatalf("background args = %#v", background.Args)
12 }
13 visible := VisibleCommandContext(context.Background(), "reasonix-ui", "--open")
14 if len(visible.Args) != 2 || visible.Args[1] != "--open" {
15 t.Fatalf("visible args = %#v", visible.Args)
16 }
17 }
18
18 lines GO