summaryrefslogtreecommitdiff
path: root/test/test_curses.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_curses.rb')
-rw-r--r--test/test_curses.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test_curses.rb b/test/test_curses.rb
index 9432c024bb..752fa47c29 100644
--- a/test/test_curses.rb
+++ b/test/test_curses.rb
@@ -28,14 +28,16 @@ rescue Exception => e
ensure
close_screen
puts "", [Marshal.dump([result, e])].pack('m').delete("\n")
+ print "\\0"
end
src
if input
w.print(input)
w.flush
end
- res = r.read
+ res = r.gets("\0")
return unless res
+ res.chomp!("\0")
res, error = Marshal.load(res[/(.*)\Z/, 1].unpack('m')[0])
raise error if error
return res