1 #![expect(unsafe_op_in_unsafe_fn, reason = "old code, not worth updating yet")] 2 3 unsafe fn test_stdio_isatty() { 4 assert_eq!(libc::isatty(libc::STDIN_FILENO), 1, "stdin is a tty"); 5 assert_eq!(libc::isatty(libc::STDOUT_FILENO), 1, "stdout is a tty"); 6 assert_eq!(libc::isatty(libc::STDERR_FILENO), 1, "stderr is a tty"); 7 } 8 9 fn main() { 10 // Run the tests. 11 unsafe { test_stdio_isatty() } 12 } 13