mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
Extra tests for string2ll
This commit is contained in:
parent
c040cbd625
commit
3edbcab95a
@ -336,6 +336,14 @@ void test_string2ll(void) {
|
||||
strcpy(buf,"+1");
|
||||
assert(string2ll(buf,strlen(buf),&v) == 0);
|
||||
|
||||
/* Leading space. */
|
||||
strcpy(buf," 1");
|
||||
assert(string2ll(buf,strlen(buf),&v) == 0);
|
||||
|
||||
/* Trailing space. */
|
||||
strcpy(buf,"1 ");
|
||||
assert(string2ll(buf,strlen(buf),&v) == 0);
|
||||
|
||||
/* May not start with 0. */
|
||||
strcpy(buf,"01");
|
||||
assert(string2ll(buf,strlen(buf),&v) == 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user