1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 15:19:42 +02:00

Update SQL Server driver library

This commit is contained in:
HarveyKandola 2019-06-25 15:37:19 +01:00
parent c538fc9eb1
commit 9c36241b58
37 changed files with 9138 additions and 1091 deletions

39
vendor/github.com/denisenkom/go-mssqldb/mssql_test.go generated vendored Normal file
View file

@ -0,0 +1,39 @@
package mssql
import (
"context"
"testing"
)
func TestBadOpen(t *testing.T) {
drv := driverWithProcess(t)
_, err := drv.open(context.Background(), "port=bad")
if err == nil {
t.Fail()
}
}
func TestIsProc(t *testing.T) {
list := []struct {
s string
is bool
}{
{"proc", true},
{"select 1;", false},
{"select 1", false},
{"[proc 1]", true},
{"[proc\n1]", false},
{"schema.name", true},
{"[schema].[name]", true},
{"schema.[name]", true},
{"[schema].name", true},
{"schema.[proc name]", true},
}
for _, item := range list {
got := isProc(item.s)
if got != item.is {
t.Errorf("for %q, got %t want %t", item.s, got, item.is)
}
}
}