diff --git a/test/lua/test-pandoc-utils.lua b/test/lua/test-pandoc-utils.lua
index 000be1f7a..4d02f6980 100644
--- a/test/lua/test-pandoc-utils.lua
+++ b/test/lua/test-pandoc-utils.lua
@@ -39,10 +39,10 @@ end
 function test_pipe ()
   if os_is_windows() then
     local pipe_result = pandoc.pipe('echo', {}, 'hi')
-    return pipe_result == 'hi\n'
+    return pipe_result == 'hi\n' or pipe_result == 'hi'
   else
     local pipe_result = pandoc.pipe('sed', {'-e', 's/a/b/'}, 'abc')
-    return pipe_result == 'bbc\n'
+    return pipe_result == 'bbc\n' or pipe_result == 'bbc'
   end
 end