spec(module_doc): add "Signals" test
This commit is contained in:
parent
5d45637954
commit
65320173e5
|
@ -19,4 +19,54 @@ describe("Scrap documentation", function()
|
|||
})
|
||||
assert.same(nodes, {})
|
||||
end)
|
||||
|
||||
it("should produce Signal nodes", function()
|
||||
local ast <const> = get_doc_from_page([[
|
||||
<h2 class="section-header"><a name="Signals"></a>Signals</h2>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a
|
||||
class="copy-link js-copy-link"
|
||||
name="widget::layout_changed"
|
||||
href="#widget::layout_changed"
|
||||
>🔗</a
|
||||
>
|
||||
<strong>widget::layout_changed</strong>
|
||||
<span class="baseclass"> · Inherited from wibox.widget.base </span>
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
<a
|
||||
class="copy-link js-copy-link"
|
||||
name="widget::redraw_needed"
|
||||
href="#widget::redraw_needed"
|
||||
>🔗</a
|
||||
>
|
||||
<strong>widget::redraw_needed</strong>
|
||||
<span class="baseclass"> · Inherited from wibox.widget.base </span>
|
||||
</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
]], "signal")
|
||||
assert.same(ast, {
|
||||
children = {
|
||||
{
|
||||
children = {
|
||||
{
|
||||
name = "widget::layout_changed",
|
||||
token = "identifier",
|
||||
},
|
||||
{
|
||||
name = "widget::redraw_needed",
|
||||
token = "identifier",
|
||||
},
|
||||
},
|
||||
name = "Signal",
|
||||
token = "enum",
|
||||
},
|
||||
},
|
||||
name = "Signal",
|
||||
token = "module",
|
||||
})
|
||||
end)
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue