mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
tests: treat TERM=unknown like unset TERM #865
This commit is contained in:
parent
c21f0fb812
commit
4f5be0b100
@ -541,7 +541,8 @@ if(${BUILD_TESTING})
|
|||||||
# sadly, this doesn't take effect until CMake 3.17...
|
# sadly, this doesn't take effect until CMake 3.17...
|
||||||
set(CMAKE_CTEST_ARGUMENTS "-V")
|
set(CMAKE_CTEST_ARGUMENTS "-V")
|
||||||
enable_testing()
|
enable_testing()
|
||||||
if(DEFINED ENV{TERM})
|
# the accursed Ubuntu buildd sets "TERM=unknown" for unfathomable reasons
|
||||||
|
if(DEFINED ENV{TERM} AND NOT $ENV{TERM} STREQUAL "unknown")
|
||||||
add_test(
|
add_test(
|
||||||
NAME ncpp_build
|
NAME ncpp_build
|
||||||
COMMAND ncpp_build
|
COMMAND ncpp_build
|
||||||
|
@ -106,7 +106,8 @@ auto main(int argc, const char **argv) -> int {
|
|||||||
std::cout << "Running with LANG=" << lang << std::endl;
|
std::cout << "Running with LANG=" << lang << std::endl;
|
||||||
}
|
}
|
||||||
const char* term = getenv("TERM");
|
const char* term = getenv("TERM");
|
||||||
if(term == nullptr){
|
// ubuntu's buildd sets TERM=unknown, fuck it, handle this atrocity
|
||||||
|
if(term == nullptr || strcmp(term, "unknown") == 0){
|
||||||
std::cerr << "TERM wasn't defined, exiting with success" << std::endl;
|
std::cerr << "TERM wasn't defined, exiting with success" << std::endl;
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user