2022-08-14 19:41:06 +09:00
|
|
|
module commands
|
2022-07-26 02:03:48 +09:00
|
|
|
|
|
|
|
import os
|
|
|
|
|
2022-08-12 22:25:42 +09:00
|
|
|
fn test_get_html_filename() {
|
|
|
|
test_path := 'index.md'
|
2022-09-06 02:35:20 +09:00
|
|
|
mut html_name := get_html_path(test_path)
|
2022-08-12 22:25:42 +09:00
|
|
|
assert html_name == 'index.html'
|
2022-09-06 02:35:20 +09: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 23:18:32 +09:00
|
|
|
}
|