blob: 8d6eede9fa23f446d36cb8d513c25602060dabde [file] [log] [blame]
banksean07b74002025-06-26 16:05:25 +00001New package with tests should not cause nil pointer panic
2
3-- go.mod --
4module sketch.dev
5
6go 1.21
7
8-- .commit --
9Initial commit with no packages
10
11-- newpkg/main.go --
12package newpkg
13
14func Hello() string {
15 return "hello"
16}
17
18-- newpkg/main_test.go --
19package newpkg
20
21import "testing"
22
23func TestHello(t *testing.T) {
24 if got := Hello(); got != "hello" {
25 t.Errorf("Hello() = %q, want %q", got, "hello")
26 }
27}
28
29-- .commit --
30Add new package with tests
31
32-- .run_test --
33OK