mirror of
https://github.com/troglobit/libite.git
synced 2026-12-04 21:48:22 +00:00
tests: Update unit test for string functions
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
72d1cb6501
commit
13ffe87d10
1 file changed
+8
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
char buf[10];
|
||||||
int val;
|
int val;
|
||||||
|
|
||||||
val = atonum("42");
|
val = atonum("42");
|
||||||
@@ -14,6 +15,13 @@ int main(void)
|
|||||||
if (string_compare("eth1", "eth1234"))
|
if (string_compare("eth1", "eth1234"))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
if (!string_case_compare("somestring", "SoMeSTRING"))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
strlcpy(buf, "tooloongstring", sizeof(buf));
|
||||||
|
if (buf[9] == 'r')
|
||||||
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in new issue
Block a user