Ticket #8265: test.c

File test.c, 305 bytes (added by Barrett, 12 years ago)
Line 
1#include <string.h>
2#include <assert.h>
3#include <stdio.h>
4
5int main() {
6 const char* test="blubber";
7 assert(memrchr("aaaa",'x',4)==0);
8 assert(memrchr(0,'x',0)==0);
9 assert(memrchr(test,'u',7) == test+2);
10 assert(memrchr(test,'b',7)==test+4);
11 assert(memrchr(test+6,'r',1)==test+6);
12 return 0;
13}