Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 0 additions & 90 deletions test/description.jl

This file was deleted.

31 changes: 31 additions & 0 deletions test/title.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
function first_line(s::String)
lines = split(s, '\n')
return string(lines[1])
end

function check(expected::Regex, real::String)
if occursin(expected, real)
@test true
else
@test false
@error string(" Expected: ", expected)
@error string("Expression: ", string(real))
end
end

@testset "Title" begin
doc = test_pandoc(
"""Some readme information.""";
description = nothing,
)
expected_pattern = Regex("\\*test.txt\\* +For NVIM v0.8.0 +Last change: " * CURRENT_DATE)
check(expected_pattern, first_line(doc))

doc = test_pandoc(
"""Some readme information.""";
vimversion = "VIM v9.0.0",
description = nothing,
)
expected_pattern = Regex("\\*test.txt\\* +For VIM v9.0.0 +Last change: " * CURRENT_DATE)
check(expected_pattern, first_line(doc))
end