2022-08-14 12:41:06 +02:00
|
|
|
module commands
|
2022-07-25 19:03:48 +02:00
|
|
|
|
2022-08-12 15:25:42 +02:00
|
|
|
fn test_get_html_filename() {
|
|
|
|
test_path := 'index.md'
|
2022-09-05 19:35:20 +02:00
|
|
|
mut html_name := get_html_path(test_path)
|
2022-08-12 15:25:42 +02:00
|
|
|
assert html_name == 'index.html'
|
2022-09-05 19:35:20 +02:00
|
|
|
|
|
|
|
test_path_2 := './post/example-post.md'
|
|
|
|
html_name = get_html_path(test_path_2)
|
|
|
|
$if windows {
|
|
|
|
assert html_name == '.\\post\\example-post.html'
|
|
|
|
} $else {
|
|
|
|
assert html_name == './post/example-post.html'
|
|
|
|
}
|
2022-08-12 16:18:32 +02:00
|
|
|
}
|