This issue has been described in more detail as Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=143341 (but note
that there are also other testing bugs mentioned there)
The symptom is this:
1) Failure:
test_readline(TestReadline) [./readline/test_readline.rb:25]:
<"> "> expected but was
<"\e[">.
After some additional investigation I found that some terminals (I tested with gnome-terminal, with TERM=xterm) insert
an escape code in the stdout file that is used by the test, so instead of the expected "> " prompt the
escape code is found. Here is the hex dump of the stdout file:
00000000 1b 5b 3f 31 30 33 34 68 3e 20 68 65 6c 6c 6f 0a |.[?1034h> hello.|
00000010
I could run the process without any problem by using a more conservative terminal, e.g. this passes the tests:
TERM=vt100 ruby -C . runner.rb -t TestReadline -v
Perhaps the test should be adjusted to always enforce a conservative terminal, e.g. by setting ENV['TERM'] at the beginning
of the test_readline method. This fixes the problem for me.
|