(t *testing.T)
| 218 | } |
| 219 | |
| 220 | func TestTSQL_NStringNotInPostgreSQL(t *testing.T) { |
| 221 | // In PostgreSQL dialect, N'hello' should be IDENTIFIER + STRING (two tokens) |
| 222 | tkz, err := NewWithDialect(keywords.DialectPostgreSQL) |
| 223 | if err != nil { |
| 224 | t.Fatalf("NewWithDialect error = %v", err) |
| 225 | } |
| 226 | tokens := tokenize(t, tkz, "N'hello'") |
| 227 | if len(tokens) != 2 { |
| 228 | t.Fatalf("expected 2 tokens for PostgreSQL N'hello', got %d", len(tokens)) |
| 229 | } |
| 230 | if tokens[0].Token.Type != models.TokenTypeIdentifier { |
| 231 | t.Errorf("expected first token to be identifier, got %v", tokens[0].Token.Type) |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | func TestTSQL_BracketIdentifierUnterminatedStructuredError(t *testing.T) { |
| 236 | tkz := newSQLServerTokenizer(t) |
nothing calls this directly
no test coverage detected