From e504bdf1d97affed8a94794a85209187d822dd26 Mon Sep 17 00:00:00 2001 From: thindil Date: Thu, 20 Jun 2024 03:56:05 +0000 Subject: [PATCH] tests: updated tests to new version of utils module FossilOrigin-Name: 1036b2198451411b8b55ec3737408dda878865e10ddd8db4e9210bb8ac3aa994 --- tests/options.nim | 3 ++- tests/output.nim | 3 ++- tests/plugins.nim | 2 +- tests/prompt.nim | 2 +- tests/suggestion.nim | 3 ++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/options.nim b/tests/options.nim index 568001b2..1d8115d1 100644 --- a/tests/options.nim +++ b/tests/options.nim @@ -25,6 +25,7 @@ ## Provides unit tests for options module +import std/paths import utils/utils import ../src/[db, history] import unittest2 @@ -33,7 +34,7 @@ include ../src/options suite "Unit tests for options module": checkpoint "Initializing the tests" - let db: DbConn = initDb(dbName = "test11.db") + let db: DbConn = initDb(dbName = "test11.db".Path) var commands: ref Table[string, CommandData] = newTable[string, CommandData]() discard initHistory(db = db, commands = commands) diff --git a/tests/output.nim b/tests/output.nim index 447c2a04..11c57682 100644 --- a/tests/output.nim +++ b/tests/output.nim @@ -25,6 +25,7 @@ ## Provides unit tests for output module +import std/paths when defined(testInput): import std/tables import utils/utils @@ -35,7 +36,7 @@ include ../src/output suite "Unit tests for output module": checkpoint "Initializing the tests" - let db: DbConn = initDb(dbName = "test12.db") + let db: DbConn = initDb(dbName = "test12.db".Path) test "Showing an error message": check: diff --git a/tests/plugins.nim b/tests/plugins.nim index 87e17b7a..66027eea 100644 --- a/tests/plugins.nim +++ b/tests/plugins.nim @@ -33,7 +33,7 @@ include ../src/plugins suite "Unit tests for plugins module": checkpoint "Initializing the tests" - let db: DbConn = initDb(dbName = "test13.db") + let db: DbConn = initDb(dbName = "test13.db".Path) var commands: ref Table[string, CommandData] = newTable[string, CommandData]() # test "Initialization of plugins": diff --git a/tests/prompt.nim b/tests/prompt.nim index 0776d5b8..2b759c80 100644 --- a/tests/prompt.nim +++ b/tests/prompt.nim @@ -33,7 +33,7 @@ include ../src/prompt suite "Unit tests for prompt module": checkpoint "Initializing the tests" - let db: DbConn = initDb(dbName = "test14.db") + let db: DbConn = initDb(dbName = "test14.db".Path) test "Getting formated directory name": check: diff --git a/tests/suggestion.nim b/tests/suggestion.nim index 02b374ab..c740d37e 100644 --- a/tests/suggestion.nim +++ b/tests/suggestion.nim @@ -25,6 +25,7 @@ ## Provides unit tests for help module +import std/paths import utils/utils import unittest2 include ../src/suggestion @@ -32,7 +33,7 @@ include ../src/suggestion suite "Unit tests for suggestion module": checkpoint "Initializing the tests" - let db: DbConn = initDb(dbName = "test14.db") + let db: DbConn = initDb(dbName = "test14.db".Path) var myaliases: ref OrderedTable[string, int] = newOrderedTable[string, int]() commands: ref Table[string, CommandData] = newTable[string, CommandData]()