Copyright clean-up (part 1):
[AROS.git] / test / clib / strchr.c
blobe66890301d728dcb4cc7e76bec5b4c788b477c71
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <stdio.h>
7 #include <string.h>
8 #include "test.h"
10 int main()
12 char *string = "test";
13 char *p;
15 TEST( strchr( string, '\0' ) != NULL );
17 p = strchr( string, 't' );
18 TEST( *p == 't' && p == &string[0] );
20 p = strchr( ++p, 't' );
21 TEST( *p == 't' && p == &string[3] );
23 TEST( strchr( ++p, 't' ) == NULL );
25 return OK;
28 void cleanup()
30 /* Nothing to clean up */