test: Add tests for trailing_strtol()

This function currently has no tests. Add some.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2022-04-24 23:30:55 -06:00
committed by Tom Rini
parent 2fa4756d03
commit 18436c74dc
2 changed files with 21 additions and 2 deletions

View File

@@ -99,7 +99,7 @@ long long simple_strtoll(const char *cp, char **endp, unsigned int base);
* For example, "abc123" would return 123.
*
* @str: String to exxamine
* Return: training number if found, else -1
* Return: trailing number if found, else -1
*/
long trailing_strtol(const char *str);
@@ -114,7 +114,7 @@ long trailing_strtol(const char *str);
* @str: String to exxamine
* @end: Pointer to end of string to examine, or NULL to use the
* whole string
* Return: training number if found, else -1
* Return: trailing number if found, else -1
*/
long trailing_strtoln(const char *str, const char *end);