#include Test(test_utils, listen_input) { struct listen_data ld = start_listening(1); write(1, "hello\n", 6); char *output = stop_listening(ld); // will get 'hello\n'. cr_assert_str_eq(output, "hello\n"); }