aboutsummaryrefslogtreecommitdiff
path: root/test/lua
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-04-17 18:02:25 -0700
committerGitHub <noreply@github.com>2020-04-17 18:02:25 -0700
commit0d2b8e3fe1d6a27aac082be7711b7156783b3051 (patch)
tree459122371d6b88a7756eee954b81f2bba4bdfdca /test/lua
parent8f40b4ba14fce10199a059a281c9bd10c884241d (diff)
parent62cf21cbaa9ac3fbc2ba7218a3037208364c80a4 (diff)
downloadpandoc-0d2b8e3fe1d6a27aac082be7711b7156783b3051.tar.gz
Merge pull request #6211 from tarleb/lua-pandocerror
API change: create PandocLua type, use PandocError for exceptions
Diffstat (limited to 'test/lua')
-rw-r--r--test/lua/module/pandoc-types.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/lua/module/pandoc-types.lua b/test/lua/module/pandoc-types.lua
index 880dd567e..d4e063a5c 100644
--- a/test/lua/module/pandoc-types.lua
+++ b/test/lua/module/pandoc-types.lua
@@ -26,10 +26,9 @@ return {
)
end),
test('non-version string is rejected', function ()
- assert.error_matches(
- function () Version '11friends' end,
- '11friends'
- )
+ local success, msg = pcall(function () Version '11friends' end)
+ assert.is_falsy(success)
+ assert.is_truthy(tostring(msg):match('11friends'))
end)
},