aboutsummaryrefslogtreecommitdiff
path: root/tests/libbuild.go
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-08-12 16:38:19 -0300
committerEuAndreh <eu@euandre.org>2024-08-14 16:57:23 -0300
commit5515fe0b549624a6e36ddc6d3889d833e95f3c6c (patch)
tree3911532619e656389886b548e265fc58fd75f68a /tests/libbuild.go
parentBuild with "go tool" and hackishly bundle code from same package into one fil... (diff)
downloadgolite-5515fe0b549624a6e36ddc6d3889d833e95f3c6c.tar.gz
golite-5515fe0b549624a6e36ddc6d3889d833e95f3c6c.tar.xz
tests/golite.go: Run tests
Use in-memory databases over disk: decrease test time from minutes to seconds.
Diffstat (limited to 'tests/libbuild.go')
-rw-r--r--tests/libbuild.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/libbuild.go b/tests/libbuild.go
new file mode 100644
index 0000000..3de29ae
--- /dev/null
+++ b/tests/libbuild.go
@@ -0,0 +1,19 @@
+package main
+
+import (
+ "database/sql"
+
+ _ "golite"
+)
+
+func main() {
+ db, err := sql.Open("sqlite3", ":memory:")
+ if err != nil {
+ panic(err)
+ }
+
+ err = db.Close()
+ if err != nil {
+ panic(err)
+ }
+}