<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/106633>106633</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[llvm-lit] Extra formatting added around test output by internal shell is affected by test output colors
</td>
</tr>
<tr>
<th>Labels</th>
<td>
llvm-lit
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
hnrklssn
</td>
</tr>
</table>
<pre>
If you run `FILECHECK_OPTS="--color" LIT_USE_INTERNAL_SHELL=1 llvm-lit [TEST]` the output for a failing FileCheck test looks like this:
<img width="840" alt="Screenshot 2024-08-29 at 2 03 29 PM" src="https://github.com/user-attachments/assets/6718d0d5-fbcf-4e28-a0b6-b15ee1127d74">
It would be neat if we could track the current color at the point of inserting `# |`, reset it before inserting `# |`, and then reapply it after.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8kk-TozYQxT-NuHThEs0f4wOHWRvXuuJstmLnPCVQyygjI5fU7GS-fUrMbLKnuYBo-jX9Hj8Vo73NRJ2ov4j6kKmFJx-6aQ4vLsY5G7x-604G3vwCYZlBNPJ4Ovf7r_3-t-c_vl8vojwIxDwfvfNBIML5dH3-69I_n75d-z-_PZ2fL1_781mUhwKc-3HPnWUQ9Zdrf7mK-iAaCTwR-IUfC4PxARQYZZ2db3C0jvYTjS_AFBmc9y8RnH0h4MlGUT4JeRDy57Xc2_sNXq3m6X2ptpJpIeX4_fkyBqI5Tp4BJVa5bHPcgWJAkCXgTvQoWimejt9_T7oYxnfdxPxYv4ZHgceb5WkZNqO_CzwukUKumNU43WnmKPCoYqT10GyLVktd52YYTV4RtrmSQ5MPRU1UFLjV20ogirL_1caJ4dUvTsNAMJNisAZeCca1xkGlMCaCcQmBZoY19uQhFR_ezgzegJ0jBU4RikYKLEFs9-tpD4EiMViGgYwP9FmrmnUaO0Mg9Xi4t6RShilsMt2VelfuVEZdscVq1zR1VWVTJ2ulq3ZbD0arQjckTYW1bAfT7NRYG53ZLkUvW9xhgYjVhiQO2JoCd6Yd5a4UlaS7sm6TYNn4cMtsjAt1hWyassycGsjFlVbEnzylFOtDFrq1MCy3KCrpbOT4_xS27FbK_xPVB-j_4aASdHfFawZKa9Kggl-S9wTdB5jDG9iZKczKQZzIObARlDE0Mun09tfm9afEbAmu-4SdtMjHLX8E_zeNLPC4uk34fBj-0eG_AQAA__9f4yTQ">