5
Last change
on this file since e3086c9c was
e3086c9c,
checked in by Himanshu40 <himanshuwindows8.1@…>, on 12/01/18 at 17:53:06
|
psxhdrs: add POSIX API signature tests for strings.h file (GCI 2018)
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * @brief rindex() API Conformance Test |
---|
4 | */ |
---|
5 | /* |
---|
6 | * COPYRIGHT (c) 2018. |
---|
7 | * Himanshu Sekhar Nayak |
---|
8 | * |
---|
9 | * Permission to use, copy, modify, and/or distribute this software |
---|
10 | * for any purpose with or without fee is hereby granted. |
---|
11 | * |
---|
12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
---|
13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
---|
14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR |
---|
15 | * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES |
---|
16 | * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, |
---|
17 | * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, |
---|
18 | * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
---|
19 | */ |
---|
20 | |
---|
21 | #ifdef HAVE_CONFIG_H |
---|
22 | #include "config.h" |
---|
23 | #endif |
---|
24 | |
---|
25 | #include <strings.h> |
---|
26 | |
---|
27 | int test( void ); |
---|
28 | |
---|
29 | int result = 1; |
---|
30 | |
---|
31 | int test( void ) |
---|
32 | { |
---|
33 | char *p; |
---|
34 | char *string = "This is a string for testing"; |
---|
35 | |
---|
36 | p = rindex( string, 'i' ); |
---|
37 | (void) p; |
---|
38 | result = 0; |
---|
39 | |
---|
40 | return result; |
---|
41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.