(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestMssqlQuoteIdentifier(t *testing.T) { |
| 11 | db := &MssqlDatabase{} |
| 12 | |
| 13 | for _, legacyIgnoreQuotes := range []bool{true, false} { |
| 14 | db.SetGeneratorConfig(database.GeneratorConfig{LegacyIgnoreQuotes: legacyIgnoreQuotes}) |
| 15 | for _, input := range []string{"PK_SystemUser", "SystemUserId", "Date", "has-dash"} { |
| 16 | expected := "[" + strings.ReplaceAll(input, "]", "]]") + "]" |
| 17 | if got := db.quoteIdentifier(input); got != expected { |
| 18 | t.Fatalf("quoteIdentifier(%q) = %q, want %q", input, got, expected) |
| 19 | } |
| 20 | } |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | func TestBuildExportTableDDLCanonicalPrimaryKey(t *testing.T) { |
| 25 | db := &MssqlDatabase{} |
nothing calls this directly
no test coverage detected