From cc81e9adfa562da7cc9e1adbe42c1ef8d2b97668 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 11 Nov 2019 17:45:11 +0200 Subject: [PATCH] v test v: cleanup more temporary files --- vlib/os/os_test.v | 4 +++- vlib/sqlite/sqlite_test.v | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/vlib/os/os_test.v b/vlib/os/os_test.v index 254dd7f226..bb47756897 100644 --- a/vlib/os/os_test.v +++ b/vlib/os/os_test.v @@ -193,5 +193,7 @@ fn cleanup_leftovers(){ os.rm('ex/ex1.txt') os.rm('ex') os.rm('ex2/ex2.txt') - os.rm('ex2') + os.rm('ex2') + os.rm('ex1.txt') + os.rm('ex2.txt') } diff --git a/vlib/sqlite/sqlite_test.v b/vlib/sqlite/sqlite_test.v index 0ee541e99e..ee52d2afaf 100644 --- a/vlib/sqlite/sqlite_test.v +++ b/vlib/sqlite/sqlite_test.v @@ -1,7 +1,9 @@ +import os import 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("create table users (id integer primary key, name text default '');") @@ -20,4 +22,5 @@ fn test_sqlite() { for row in users { println(row.vals) } + os.rm(db_file) }