Skip to content

Commit

Permalink
Add tests for RawInline and its properties
Browse files Browse the repository at this point in the history
  • Loading branch information
tarleb committed Nov 5, 2024
1 parent 005891f commit 847ee54
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/test-inline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,20 @@ return {
assert.are_equal(elem, Quoted(DoubleQuote, {'a'}))
end)
},
group 'RawInline' {
test('has property `format`', function ()
local elem = RawInline('html', '<mark>nice</mark>')
assert.are_same(elem.format, 'html')
elem.format = 'html5'
assert.are_equal(elem, RawInline('html5', '<mark>nice</mark>'))
end),
test('has property `text`', function ()
local elem = RawInline('html', '<mark>nice</mark>')
assert.are_same(elem.text, '<mark>nice</mark>')
elem.text = '<var>x</var>'
assert.are_equal(elem, RawInline('html', '<var>x</var>'))
end)
},
group 'SmallCaps' {
test('has property `content`', function ()
local elem = SmallCaps{'two', Space(), 'words'}
Expand Down

0 comments on commit 847ee54

Please sign in to comment.