vim: Set TERM=xterm-256color for test

I spent some time investigating the difference of vim test results from
different editors.  It turns out the value of TERM can affect the test
results in a deterministic way: when TERM=xterm-256color all tests pass,
when TERM=linux one test fails, and when TERM=vt100 20+ tests fail.

As we are redirecting the output to a file, the actual type of the
terminal does not matter and we can just specify a value known to work.
This commit is contained in:
Xi Ruoyao 2024-02-23 23:47:06 +08:00
parent 109afb297c
commit 3827fcf6e2
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3

View File

@ -71,10 +71,13 @@
<para>Now run the tests as user <systemitem
class="username">tester</systemitem>:</para>
<screen><userinput remap="test">su tester -c "LANG=en_US.UTF-8 make -j1 test" &amp;> vim-test.log</userinput></screen>
<screen><userinput remap="test">su tester -c "TERM=xterm-256color LANG=en_US.UTF-8 make -j1 test" \
&amp;> vim-test.log</userinput></screen>
<para>The test suite outputs a lot of binary data to the screen. This can
cause issues with the settings of the current terminal. The problem can be
cause issues with the settings of the current terminal (especially while
we are overriding the <envar>TERM</envar> variable to satisify some
assumptions of the test suite). The problem can be
avoided by redirecting the output to a log file as shown above. A
successful test will result in the words "ALL DONE" in the log file
at completion.</para>