v test v: cleanup more temporary files
parent
0ab09a57f7
commit
cc81e9adfa
|
@ -193,5 +193,7 @@ fn cleanup_leftovers(){
|
||||||
os.rm('ex/ex1.txt')
|
os.rm('ex/ex1.txt')
|
||||||
os.rm('ex')
|
os.rm('ex')
|
||||||
os.rm('ex2/ex2.txt')
|
os.rm('ex2/ex2.txt')
|
||||||
os.rm('ex2')
|
os.rm('ex2')
|
||||||
|
os.rm('ex1.txt')
|
||||||
|
os.rm('ex2.txt')
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
|
import os
|
||||||
import sqlite
|
import sqlite
|
||||||
|
|
||||||
fn test_sqlite() {
|
fn test_sqlite() {
|
||||||
db := sqlite.connect('users.db')
|
db_file := 'users.db'
|
||||||
|
db := sqlite.connect(db_file)
|
||||||
db.exec("drop table if exists users")
|
db.exec("drop table if exists users")
|
||||||
db.exec("create table users (id integer primary key, name text default '');")
|
db.exec("create table users (id integer primary key, name text default '');")
|
||||||
|
|
||||||
|
@ -20,4 +22,5 @@ fn test_sqlite() {
|
||||||
for row in users {
|
for row in users {
|
||||||
println(row.vals)
|
println(row.vals)
|
||||||
}
|
}
|
||||||
|
os.rm(db_file)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue