[0;32m eclipse显示颜色
用 eclipse cdt 运行 gtest 在 console 的输出结果有有 shell 终端的颜色代码输出
Running main() from gmock_main.cc
[0;32m[==========] [mRunning 4 tests from 1 test case.
[0;32m[----------] [mGlobal test environment set-up.
[0;32m[----------] [m4 tests from PrimeFactors
[0;32m[ RUN ] [mPrimeFactors.1factor
[0;32m[ OK ] [mPrimeFactors.1factor (0 ms)
[0;32m[ RUN ] [mPrimeFactors.2factor
[0;32m[ OK ] [mPrimeFactors.2factor (0 ms)
[0;32m[ RUN ] [mPrimeFactors.3factor
[0;32m[ OK ] [mPrimeFactors.3factor (0 ms)
[0;32m[ RUN ] [mPrimeFactors.4factor
[0;32m[ OK ] [mPrimeFactors.4factor (0 ms)
[0;32m[----------] [m4 tests from PrimeFactors (0 ms total)
[0;32m[----------] [mGlobal test environment tear-down
[0;32m[==========] [m4 tests from 1 test case ran. (0 ms total)
[0;32m[ PASSED ] [m4 tests.
如何让 console 的输出和 shell 中的输出效果相同。
可以通过在 eclipse market 安装 ANSI escape 来解决。