1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 08:13:14 +02:00

core: use function util_parse_int in function string_get_priority_and_name

This commit is contained in:
Sébastien Helleu
2026-03-15 09:07:02 +01:00
parent 38f9a5587f
commit 94e5de4836
2 changed files with 10 additions and 11 deletions
+4 -4
View File
@@ -2971,11 +2971,11 @@ TEST(CoreString, GetPriorityAndName)
LONGS_EQUAL(500, priority);
STRCMP_EQUAL("", ptr_name);
/* "|" => (0, "") */
/* "|" => (default_priority, "") */
priority = -1;
ptr_name = NULL;
string_get_priority_and_name (delimiter, &priority, &ptr_name, 500);
LONGS_EQUAL(0, priority);
LONGS_EQUAL(500, priority);
STRCMP_EQUAL("", ptr_name);
/* "test" => (default_priority, "test") */
@@ -2985,11 +2985,11 @@ TEST(CoreString, GetPriorityAndName)
LONGS_EQUAL(500, priority);
STRCMP_EQUAL("test", ptr_name);
/* "|test" => (0, "test") */
/* "|test" => (default_priority, "test") */
priority = -1;
ptr_name = NULL;
string_get_priority_and_name (name_prio_empty, &priority, &ptr_name, 500);
LONGS_EQUAL(0, priority);
LONGS_EQUAL(500, priority);
STRCMP_EQUAL("test", ptr_name);
/* "1234|test" => (1234, "test") */