summary refs log tree commit diff stats
path: root/lib/impure/db_sqlite.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2015-04-21 15:36:37 +0200
committerAndreas Rumpf <rumpf_a@web.de>2015-04-21 15:36:37 +0200
commit4370163fdd46f0ca05af18387b14594de0b0e216 (patch)
tree173655b56613e2cc7e20ed1fb871a726130878eb /lib/impure/db_sqlite.nim
parent3f546e4a5499309b24e723bd4c44c950e02ca0fe (diff)
parent22db40e5e4c1bfb5f2ea3b6864873b2edff30764 (diff)
downloadNim-4370163fdd46f0ca05af18387b14594de0b0e216.tar.gz
Merge pull request #2583 from BlaXpirit/test-stdlib
Test stdlib
Diffstat (limited to 'lib/impure/db_sqlite.nim')
-rw-r--r--lib/impure/db_sqlite.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/impure/db_sqlite.nim b/lib/impure/db_sqlite.nim
index 4be692f39..8536ab6f2 100644
--- a/lib/impure/db_sqlite.nim
+++ b/lib/impure/db_sqlite.nim
@@ -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)", [])