Test helpers and unit tests (#26)
* Implement a few utility functions for tests Most tests would require a test file hierarchy instead of operating on a live system. * Add unit tests for `tab::scan_path` Tests: * Works on a valid path * Returns an empty Vec on an invalid directory * Returns an empty Vec for an empty directory I also implemented a few test helpers that may be useful for other unit tests. * Less spammy test logs and placate Clippy.
This commit is contained in:
parent
60eeb724d1
commit
d6c58991c0
4 changed files with 228 additions and 0 deletions
|
|
@ -47,3 +47,10 @@ debug = true
|
|||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
fork = "0.1"
|
||||
|
||||
[dev-dependencies]
|
||||
# cap-std = "3"
|
||||
# cap-tempfile = "3"
|
||||
fastrand = "2"
|
||||
tempfile = "3"
|
||||
test-log = "0.2"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue