forked from starnakin/IronGOLEM
add: \0 in strcpy strncpy and strcat
This commit is contained in:
20
tests/strcpy.🗿
Normal file
20
tests/strcpy.🗿
Normal file
@ -0,0 +1,20 @@
|
||||
main()
|
||||
{
|
||||
local str;
|
||||
|
||||
name = "strcpy";
|
||||
|
||||
str = galloc(10);
|
||||
|
||||
strcpy(str, "yo");
|
||||
test_str(str, "yo", "");
|
||||
|
||||
strcpy(str, "");
|
||||
test_str(str, "", "");
|
||||
|
||||
strcpy(str, "bonjorsss");
|
||||
strcpy(str, "bonjour");
|
||||
test_str(str, "bonjour", "set last \0");
|
||||
|
||||
free(str);
|
||||
}
|
Reference in New Issue
Block a user