MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / TestTSQL_BracketIdentifierValid

Function TestTSQL_BracketIdentifierValid

pkg/sql/tokenizer/tsql_test.go:251–263  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

249}
250
251func TestTSQL_BracketIdentifierValid(t *testing.T) {
252 tkz := newSQLServerTokenizer(t)
253 tokens := tokenize(t, tkz, "[My Column]")
254 if len(tokens) != 1 {
255 t.Fatalf("expected 1 token, got %d", len(tokens))
256 }
257 if tokens[0].Token.Type != models.TokenTypeIdentifier {
258 t.Errorf("expected TokenTypeIdentifier, got %v", tokens[0].Token.Type)
259 }
260 if tokens[0].Token.Value != "My Column" {
261 t.Errorf("expected value 'My Column', got %q", tokens[0].Token.Value)
262 }
263}

Callers

nothing calls this directly

Calls 4

newSQLServerTokenizerFunction · 0.85
tokenizeFunction · 0.85
FatalfMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected