aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec/exec_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/exec/exec_test.go')
-rw-r--r--src/os/exec/exec_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go
index 2746ad8783..2d966b627e 100644
--- a/src/os/exec/exec_test.go
+++ b/src/os/exec/exec_test.go
@@ -1855,3 +1855,9 @@ func TestStart_twice(t *testing.T) {
t.Fatalf("Start call returned err %q, want %q", got, want)
}
}
+
+func TestNoStringPanic(t *testing.T) {
+ if s := fmt.Sprintf("%v", &exec.Cmd{}); strings.Contains(s, "PANIC") {
+ t.Fatalf("got %q, want no panic", s)
+ }
+}