add tests

This commit is contained in:
Simon Vieille 2024-03-20 11:42:28 +01:00
commit f4946b3c08
Signed by untrusted user: deblan
GPG key ID: 579388D585F70417
2 changed files with 64 additions and 0 deletions

15
database/database_test.go Normal file
View 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")
}
}