Skip to content

Commit

Permalink
style: Shortened convert_numbers_to_strings to conv_nums_to_strs
Browse files Browse the repository at this point in the history
…and other minor changes.
  • Loading branch information
odkr committed Apr 5, 2021
1 parent dfc30a4 commit 9226cdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pandoc-zotxt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ end

do
local read = pandoc.read
local header = '---\n%s\n---'
local header = '---\n%s\n...'

function read_yaml_file (fname)
local str, err, errno = read_file(fname)
Expand Down
8 changes: 4 additions & 4 deletions test/scripts/unit-tests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -380,11 +380,11 @@ end
-- Converters
-- ----------

function test_convert_numbers_to_strings ()
function test_conv_nums_to_strs ()
local a = {}
a.a = a
lu.assert_error(M.convert_numbers_to_strings, a)
lu.assert_nil(M.convert_numbers_to_strings())
lu.assert_error(M.conv_nums_to_strs, a)
lu.assert_nil(M.conv_nums_to_strs())

local tests = {
[true] = true, [1] = '1', [1.1] = '1', ['a'] = 'a', [{}] = {},
Expand All @@ -398,7 +398,7 @@ function test_convert_numbers_to_strings ()
}

for k, v in pairs(tests) do
lu.assert_equals(M.convert_numbers_to_strings(k), v)
lu.assert_equals(M.conv_nums_to_strs(k), v)
end
end

Expand Down

0 comments on commit 9226cdc

Please sign in to comment.