feat(test): test ansi colors with stderr/stdout merged output

This commit is contained in:
Barrett Ruth 2025-09-20 13:03:07 -04:00
parent b507dad4a7
commit 56c31b22b9
4 changed files with 176 additions and 130 deletions

9
spec/fixtures/interleaved.cpp vendored Normal file
View file

@ -0,0 +1,9 @@
#include <iostream>
#include <cstdio>
int main() {
std::cout << "\033[32mstdout: \033[1mSuccess\033[0m" << std::endl;
std::cerr << "\033[31mstderr: \033[1mWarning\033[0m" << std::endl;
std::cout << "plain stdout" << std::endl;
return 0;
}

8
spec/fixtures/syntax_error.cpp vendored Normal file
View file

@ -0,0 +1,8 @@
#include <iostream>
int main() {
std::cout << "this will never compile" << std::endl
// missing semicolon above
undefined_function();
return 0
// missing semicolon again