Link parser

This commit is contained in:
2020-02-15 16:49:24 +01:00
parent 9f6d989657
commit 7c408c0f86
2 changed files with 35 additions and 13 deletions

View File

@@ -2,17 +2,18 @@ import unittest, os
import lamv
suite "Test the file detection":
setup:
const root = "./example"
test "Directory does not exist":
expect(OSError):
discard scanDir("./ThisDirDoesNotExist")
const root = "example"
setCurrentDir(root)
test "Find org files":
let files = scanDir(root)
let files = scanDir()
var parts: tuple[dir, name, ext: string]
check files.len > 1
for file in files:
parts = splitFile(file)
check parts.ext == ".org"
check parts.ext == ".org"
test "Find links in file":
let files = scanDir()
for file in files:
discard file.parseLinks()