Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lu-zhengda committed Dec 18, 2024
1 parent 70ee2e6 commit 31d6a30
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions normalizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,27 @@ func TestNormalizeDeobfuscatedSQL(t *testing.T) {
WithDBMS(DBMSSQLServer),
},
},
{
input: `SELECT * FROM [public].[my users] WHERE id = ?`,
expected: `SELECT * FROM [public].[my users] WHERE id = ?`,
statementMetadata: StatementMetadata{
Tables: []string{`[public].[my users]`},
Comments: []string{},
Commands: []string{"SELECT"},
Procedures: []string{},
Size: 25,
},
normalizationConfig: &normalizerConfig{
CollectComments: true,
CollectCommands: true,
CollectTables: true,
KeepSQLAlias: true,
KeepIdentifierQuotation: true,
},
lexerOptions: []lexerOption{
WithDBMS(DBMSSQLServer),
},
},
}

for _, test := range tests {
Expand Down

0 comments on commit 31d6a30

Please sign in to comment.