X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fccan_tokenizer%2Ftest%2Frun-simple-token.c;h=7957dba07d4c500e25b957be6b3fa4be01589e91;hb=03f017e9aff901d5d80bd577732543961a13c497;hp=efc394309c562c7d4524147b662482a65fd8e221;hpb=85a33135890965218010b79c89e4d3f4905727e3;p=ccan diff --git a/ccan/ccan_tokenizer/test/run-simple-token.c b/ccan/ccan_tokenizer/test/run-simple-token.c index efc39430..7957dba0 100644 --- a/ccan/ccan_tokenizer/test/run-simple-token.c +++ b/ccan/ccan_tokenizer/test/run-simple-token.c @@ -49,7 +49,7 @@ static struct token_list *test_tokens(const char *orig, unsigned int size) char *string = talloc_strdup(NULL, orig); unsigned int i; - toks = tokenize(string, strlen(string), MQ); + toks = tokenize(string, string, strlen(string), MQ); ok1(token_list_sanity_check(toks, stdout)); ok1(token_list_count(toks) == strlen(string)/size + 1); @@ -71,7 +71,7 @@ static struct token_list *test_tokens_spaced(const char *orig, char *string = spacify(orig, size); unsigned int i; - toks = tokenize(string, strlen(string), MQ); + toks = tokenize(string, string, strlen(string), MQ); ok1(token_list_sanity_check(toks, stdout)); ok1(token_list_count(toks) == strlen(orig)/size*2 + 1); @@ -98,7 +98,7 @@ static struct token_list *test_tokens_backslashed(const char *orig, const char *string = backslashify(orig); unsigned int i; - toks = tokenize(string, strlen(string), MQ); + toks = tokenize(string, string, strlen(string), MQ); ok1(token_list_sanity_check(toks, stdout)); ok1(token_list_count(toks) == strlen(orig)/size + 1); @@ -173,7 +173,7 @@ int main(void) /* char literal */ str = talloc_strdup(NULL, char_token); - toks = tokenize(str, strlen(str), MQ); + toks = tokenize(str, str, strlen(str), MQ); ok1(token_list_sanity_check(toks, stdout)); ok1(token_list_count(toks) == 2); ok1(item(0).type == TOK_STARTLINE); @@ -187,7 +187,7 @@ int main(void) /* string literal */ str = talloc_strdup(NULL, string_token); - toks = tokenize(str, strlen(str), MQ); + toks = tokenize(str, str, strlen(str), MQ); ok1(token_list_sanity_check(toks, stdout)); ok1(token_list_count(toks) == 2); ok1(item(0).type == TOK_STARTLINE); @@ -201,7 +201,7 @@ int main(void) /* Identifiers */ str = talloc_strdup(NULL, ident_tokens); - toks = tokenize(str, strlen(str), MQ); + toks = tokenize(str, str, strlen(str), MQ); ok1(token_list_sanity_check(toks, stdout)); token_list_dump(toks, stdout); ok1(token_list_count(toks) == 10); @@ -248,7 +248,7 @@ int main(void) /* Identifiers */ backslashed_idents = backslashify(ident_tokens); - toks = tokenize(backslashed_idents, strlen(backslashed_idents), MQ); + toks = tokenize(backslashed_idents, backslashed_idents, strlen(backslashed_idents), MQ); ok1(token_list_sanity_check(toks, stdout)); ok1(token_list_count(toks) == 10); ok1(item(0).type == TOK_STARTLINE);