git.iko.soy/typeable/pandoc
on master help sign in
More adjustments to test-pandoc-utils.lua.

We need to find something that will work on windows.

commit9f2af30c066d4d821237532b1dea3c8f3e7fac7b authorJohn MacFarlane <jgm@berkeley.edu> dateTue 8 May 2018, 12:28 (8 years ago) parentfa4f3c5
1 file changed+4−5
test/lua/test-pandoc-utils.lua+4−5
test/lua/test-pandoc-utils.lua+4−5
@@ -38,7 +38,7 @@ end
3838
3939function test_pipe ()
4040 if os_is_windows() then
41− local pipe_result = pandoc.pipe('echo', {}, 'hi')
41+ local pipe_result = pandoc.pipe('find', {'hi'}, 'hi')
4242 return pipe_result == 'hi\n' or pipe_result == 'hi'
4343 else
4444 local pipe_result = pandoc.pipe('tr', {'a', 'b'}, 'abc')
@@ -48,11 +48,10 @@ end
4848
4949function test_failing_pipe ()
5050 if os_is_windows() then
51− local res, err = pcall(pandoc.pipe, 'cd', {}, 'NoNExistEnt')
51+ local res, err = pcall(pandoc.pipe, 'find', {'/a'}, 'hi')
5252 return not res and
53− err.command == 'cd' and
54− err.error_code == 1 and
55− err.output == ''
53+ err.command == 'find' and
54+ err.error_code ~= 0
5655 else
5756 local res, err = pcall(pandoc.pipe, 'false', {}, 'abc')
5857 return not res and