alexbrainman / odbc

odbc driver written in go
BSD 3-Clause "New" or "Revised" License
352 stars 140 forks source link

test serverVersion #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Testing on MS SQL Server 2012 returns wrong skips, like this one:

--- SKIP: TestMSSQLMerge (0.00s)
        mssql_test.go:1037: skipping test; needs MS SQL Server 2008 or later

due to an error in mssql_test.go at line 136, which should be changed from

    if len(l12) != 2 {

to

    if len(l12) < 2 {

In fact, the statement "select @@version" returns:
Microsoft SQL Server 2012 - 11.0.5058.0 (Intel X86) 
...

where the part number has two spaces and splitting returns a slice with 3 
items: ["11.0.5058.0 ", "(Intel", "X86)"], while two are expected.

Original issue reported on code.google.com by lorenzo....@gmail.com on 11 Jan 2015 at 10:59

GoogleCodeExporter commented 9 years ago
I don't have MS SQL Server 2012 to verify your problem. But it sounds 
reasonable. So here https://codereview.appspot.com/193080043 is the change. 
Would you like to review it?

Alex

Original comment by alex.bra...@gmail.com on 11 Jan 2015 at 11:23

GoogleCodeExporter commented 9 years ago
This issue was closed by revision aa2e03be1f0b.

Original comment by alex.bra...@gmail.com on 13 Jan 2015 at 10:41