// S : tags min $TAGS // S : expect --result valid // S : cc -o test.bc $CC_OPT $file // S : verify --capture $dir/stdin.bin:nofollow:/file -o nofail:malloc $V_OPT test.bc #include #include #include int main() { int fd = open( "/file", O_RDONLY ); char buf[4]; char want[] = { 0xde, 0xad, 0xbe, 0xef }; assert( read( fd, &buf, 4 ) == 4 ); assert( !memcmp( buf, want, 4 ) ); assert( read( fd, &buf, 4 ) == 0 ); }