// S : tags kleetodo $TAGS // S : expect --result valid // S : cc -o test.bc $CC_OPT $file // S : verify $V_OPT test.bc #include #include #include int main() { char buf[ 15 ] = "b\0x"; strncpy( buf + 1, buf, 1 ); assert( buf[ 2 ] == 'x' ); buf[ 2 ] = 0; __dios_trace_f( "buf = '%s'", buf ); assert( !strcmp( buf, "bb" ) ); }