Skip to content

Commit

Permalink
test(inputters): Add test for fragments with multiple top level items
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Dec 30, 2022
1 parent 14a9e4c commit 95d1cb6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions inputters/sil_spec.lua
Expand Up @@ -59,6 +59,14 @@ describe("#SIL #inputter", function ()
assert.is.equal("bar", t[1][1])
end)

it("fragments with multiple top level nodes", function()
local t = inputter:parse([[foo \bar{bar}]])[1]
assert.is.equal("document", t.command)
assert.is.equal("foo ", t[1][1])
assert.is.equal("bar", t[1][2].command)
assert.is.equal("bar", t[1][2][1][1])
end)

end)

describe("should reject", function ()
Expand Down

0 comments on commit 95d1cb6

Please sign in to comment.