forked from deblan/database-anonymizer
add tests
This commit is contained in:
parent
b547166c83
commit
f4946b3c08
2 changed files with 64 additions and 0 deletions
15
database/database_test.go
Normal file
15
database/database_test.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package database
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestEscapeTable(t *testing.T) {
|
||||
if EscapeTable("mysql", "foo") != "`foo`" {
|
||||
t.Fatalf("TestEscapeTable: mysql check failed")
|
||||
}
|
||||
|
||||
if EscapeTable("postgres", "foo") != "\"foo\"" {
|
||||
t.Fatalf("TestEscapeTable: postgres check failed")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue