Skip to content

Commit

Permalink
tests: updated tests to new version of utils module
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 1036b2198451411b8b55ec3737408dda878865e10ddd8db4e9210bb8ac3aa994
  • Loading branch information
thindil committed Jun 20, 2024
1 parent d2f0788 commit e504bdf
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion tests/options.nim
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

## Provides unit tests for options module

import std/paths
import utils/utils
import ../src/[db, history]
import unittest2
Expand All @@ -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)

Expand Down
3 changes: 2 additions & 1 deletion tests/output.nim
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

## Provides unit tests for output module

import std/paths
when defined(testInput):
import std/tables
import utils/utils
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
2 changes: 1 addition & 1 deletion tests/prompt.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion tests/suggestion.nim
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@

## Provides unit tests for help module

import std/paths
import utils/utils
import unittest2
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]()
Expand Down

0 comments on commit e504bdf

Please sign in to comment.