|
Last change
on this file was 2036, checked in by bird, 20 years ago |
|
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Author Date Id Revision
|
|
File size:
437 bytes
|
| Line | |
|---|
| 1 | /* Testcase for strtok reported by Andrew Church <achurch@achurch.org>. */
|
|---|
| 2 | #include <stdio.h>
|
|---|
| 3 | #include <string.h>
|
|---|
| 4 |
|
|---|
| 5 | int
|
|---|
| 6 | main (void)
|
|---|
| 7 | {
|
|---|
| 8 | char buf[1] = { 0 };
|
|---|
| 9 | int result = 0;
|
|---|
| 10 |
|
|---|
| 11 | if (strtok (buf, " ") != NULL)
|
|---|
| 12 | {
|
|---|
| 13 | puts ("first strtok call did not return NULL");
|
|---|
| 14 | result = 1;
|
|---|
| 15 | }
|
|---|
| 16 | else if (strtok (NULL, " ") != NULL)
|
|---|
| 17 | {
|
|---|
| 18 | puts ("second strtok call did not return NULL");
|
|---|
| 19 | result = 1;
|
|---|
| 20 | }
|
|---|
| 21 |
|
|---|
| 22 | return result;
|
|---|
| 23 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.