MCPcopy
hub / github.com/sqlc-dev/sqlc / TestSplitContextCancellation

Function TestSplitContextCancellation

internal/sql/sqlfile/split_test.go:76–86  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

74}
75
76func TestSplitContextCancellation(t *testing.T) {
77 ctx, cancel := context.WithCancel(context.Background())
78 cancel() // Cancel immediately
79
80 reader := strings.NewReader("SELECT * FROM users;")
81 _, err := Split(ctx, reader)
82
83 if err != context.Canceled {
84 t.Errorf("Expected context.Canceled error, got %v", err)
85 }
86}
87
88func TestExtractDollarTag(t *testing.T) {
89 tests := []struct {

Callers

nothing calls this directly

Calls 1

SplitFunction · 0.85

Tested by

no test coverage detected