Merge pull request #2583 from BlaXpirit/test-stdlib

Test stdlib
This commit is contained in:
Andreas Rumpf
2015-04-21 15:36:37 +02:00
committed by ringabout
parent 4998c99d05
commit 5da8e91358

View File

@@ -205,7 +205,7 @@ proc setEncoding*(connection: TDbConn, encoding: string): bool {.
exec(connection, sql"PRAGMA encoding = ?", [encoding])
result = connection.getValue(sql"PRAGMA encoding") == encoding
when isMainModule:
when not defined(testing) and isMainModule:
var db = open("db.sql", "", "", "")
exec(db, sql"create table tbl1(one varchar(10), two smallint)", [])
exec(db, sql"insert into tbl1 values('hello!',10)", [])