git.iko.soy/typeable/pandoc
on master help sign in
Another try at test-pandoc-utils.lua on windows.
5f33d2eJohn MacFarlane
test/lua/test-pandoc-utils.lua+2−3
@@ -39,11 +39,10 @@ end
39function test_pipe ()
39function test_pipe ()
40 if os_is_windows() then
40 if os_is_windows() then
41 local pipe_result = pandoc.pipe('find', {'hi'}, 'hi')
41 local pipe_result = pandoc.pipe('find', {'hi'}, 'hi')
42− print(pipe_result)
42+ return pipe_result:match("%a+") == 'hi'
43− return pipe_result == 'hi\n' or pipe_result == 'hi'
44 else
43 else
45 local pipe_result = pandoc.pipe('tr', {'a', 'b'}, 'abc')
44 local pipe_result = pandoc.pipe('tr', {'a', 'b'}, 'abc')
46− return pipe_result == 'bbc\n' or pipe_result == 'bbc'
45+ return pipe_result:match("%a+") == 'bbc'
47 end
46 end
48end
47end
49
48