mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2026-06-19 07:40:52 +00:00
only run termios test if stdin is a tty
This commit is contained in:
@@ -24,6 +24,7 @@ void resetTermios(void) {
|
||||
}
|
||||
|
||||
TEST_CASE("init and reset termios") {
|
||||
if (isatty(STDIN_FILENO)) {
|
||||
struct termios original;
|
||||
tcgetattr(0, &original);
|
||||
SUBCASE("no echo") {
|
||||
@@ -37,6 +38,7 @@ TEST_CASE("init and reset termios") {
|
||||
tcgetattr(0, ¤t);
|
||||
CHECK(std::memcmp(&original, ¤t, sizeof(struct termios)) == 0);
|
||||
}
|
||||
}
|
||||
|
||||
char getch_(int echo) {
|
||||
char ch;
|
||||
|
||||
Reference in New Issue
Block a user