[rtems commit] psxhdrs: Add POSIX API Signature Compliance Tests for string.h (GCI 2018)
Joel Sherrill
joel at rtems.org
Thu Dec 6 19:06:53 UTC 2018
Module: rtems
Branch: master
Commit: b24c098cc835b232cb7ffe7e248564614d4f6773
Changeset: http://git.rtems.org/rtems/commit/?id=b24c098cc835b232cb7ffe7e248564614d4f6773
Author: Himanshu40 <himanshuwindows8.1 at gmail.com>
Date: Thu Dec 6 13:06:29 2018 -0600
psxhdrs: Add POSIX API Signature Compliance Tests for string.h (GCI 2018)
---
testsuites/psxtests/Makefile.am | 34 ++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/memccpy.c | 41 +++++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/memchr.c | 40 ++++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/memcmp.c | 40 ++++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/memcpy.c | 40 ++++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/memmove.c | 40 ++++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/memset.c | 41 +++++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/stpcpy.c | 38 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/stpncpy.c | 40 ++++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strcat.c | 39 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strchr.c | 38 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strcmp.c | 39 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strcoll.c | 39 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strcoll_l.c | 41 +++++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strcpy.c | 39 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strcspn.c | 39 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strdup.c | 38 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strerror.c | 38 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strerror_l.c | 40 ++++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strerror_r.c | 39 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strlen.c | 38 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strncat.c | 40 ++++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strncmp.c | 39 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strncpy.c | 39 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strndup.c | 38 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strnlen.c | 38 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strpbrk.c | 39 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strrchr.c | 38 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strsignal.c | 37 ++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strspn.c | 39 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strstr.c | 39 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strtok.c | 39 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strtok_r.c | 40 ++++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strxfrm.c | 39 +++++++++++++++++++++++
testsuites/psxtests/psxhdrs/string/strxfrm_l.c | 41 +++++++++++++++++++++++++
35 files changed, 1366 insertions(+)
diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index 1523dde..526a500 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -1372,6 +1372,40 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
psxhdrs/stdio/vsscanf.c \
psxhdrs/stdio/pclose.c \
psxhdrs/stdio/popen.c \
+ psxhdrs/string/memccpy.c \
+ psxhdrs/string/memchr.c \
+ psxhdrs/string/memcmp.c \
+ psxhdrs/string/memcpy.c \
+ psxhdrs/string/memmove.c \
+ psxhdrs/string/memset.c \
+ psxhdrs/string/stpcpy.c \
+ psxhdrs/string/stpncpy.c \
+ psxhdrs/string/strcat.c \
+ psxhdrs/string/strchr.c \
+ psxhdrs/string/strcmp.c \
+ psxhdrs/string/strcoll.c \
+ psxhdrs/string/strcoll_l.c \
+ psxhdrs/string/strcpy.c \
+ psxhdrs/string/strcspn.c \
+ psxhdrs/string/strdup.c \
+ psxhdrs/string/strerror.c \
+ psxhdrs/string/strerror_l.c \
+ psxhdrs/string/strerror_r.c \
+ psxhdrs/string/strlen.c \
+ psxhdrs/string/strncat.c \
+ psxhdrs/string/strncmp.c \
+ psxhdrs/string/strncpy.c \
+ psxhdrs/string/strndup.c \
+ psxhdrs/string/strnlen.c \
+ psxhdrs/string/strpbrk.c \
+ psxhdrs/string/strrchr.c \
+ psxhdrs/string/strsignal.c \
+ psxhdrs/string/strspn.c \
+ psxhdrs/string/strstr.c \
+ psxhdrs/string/strtok.c \
+ psxhdrs/string/strtok_r.c \
+ psxhdrs/string/strxfrm.c \
+ psxhdrs/string/strxfrm_l.c \
psxhdrs/strings/bcmp.c \
psxhdrs/strings/bcopy.c \
psxhdrs/strings/ffs.c \
diff --git a/testsuites/psxtests/psxhdrs/string/memccpy.c b/testsuites/psxtests/psxhdrs/string/memccpy.c
new file mode 100644
index 0000000..1f93c52
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/memccpy.c
@@ -0,0 +1,41 @@
+/**
+ * @file
+ * @brief memccpy() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ void *s1 = NULL;
+ void *s2 = NULL;
+ int c = 2;
+ size_t n = 2;
+ void *result;
+
+ result = memccpy( s1, s2, c, n );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/memchr.c b/testsuites/psxtests/psxhdrs/string/memchr.c
new file mode 100644
index 0000000..8a67161
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/memchr.c
@@ -0,0 +1,40 @@
+/**
+ * @file
+ * @brief memchr() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ void *s = "Example string";
+ int c = 2;
+ size_t n = 2;
+ void *result;
+
+ result = memchr( s, c, n );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/memcmp.c b/testsuites/psxtests/psxhdrs/string/memcmp.c
new file mode 100644
index 0000000..1895d35
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/memcmp.c
@@ -0,0 +1,40 @@
+/**
+ * @file
+ * @brief memcmp() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ void *ptr1 = NULL;
+ void *ptr2 = NULL;
+ size_t num = 2;
+ int result;
+
+ result = memcmp( ptr1, ptr2, num );
+
+ return result;
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/memcpy.c b/testsuites/psxtests/psxhdrs/string/memcpy.c
new file mode 100644
index 0000000..a0afb6e
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/memcpy.c
@@ -0,0 +1,40 @@
+/**
+ * @file
+ * @brief memcpy() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ void *destination = NULL;
+ void *source = NULL;
+ size_t num = 2;
+ void *result;
+
+ result = memcpy( destination, source, num );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/memmove.c b/testsuites/psxtests/psxhdrs/string/memmove.c
new file mode 100644
index 0000000..b52de24
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/memmove.c
@@ -0,0 +1,40 @@
+/**
+ * @file
+ * @brief memmove() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ void *destination = NULL;
+ void *source = NULL;
+ size_t num = 2;
+ void *result;
+
+ result = memmove( destination, source, num );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/memset.c b/testsuites/psxtests/psxhdrs/string/memset.c
new file mode 100644
index 0000000..adc93eb
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/memset.c
@@ -0,0 +1,41 @@
+/**
+ * @file
+ * @brief memset() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char buffer[32];
+ void *ptr = buffer;
+ int value = 3;
+ size_t num = 2;
+ void *result;
+
+ result = memset( ptr, value, num );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/stpcpy.c b/testsuites/psxtests/psxhdrs/string/stpcpy.c
new file mode 100644
index 0000000..574f4f6
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/stpcpy.c
@@ -0,0 +1,38 @@
+/**
+ * @file
+ * @brief stpcpy() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char buffer[20];
+ void *result = buffer;
+
+ result = stpcpy( result, "foo" );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/stpncpy.c b/testsuites/psxtests/psxhdrs/string/stpncpy.c
new file mode 100644
index 0000000..a846b93
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/stpncpy.c
@@ -0,0 +1,40 @@
+/**
+ * @file
+ * @brief stpncpy() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello world";
+ char *src = "Dude";
+ size_t num = 2;
+ char *result;
+
+ result = stpncpy( dest, src, num );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strcat.c b/testsuites/psxtests/psxhdrs/string/strcat.c
new file mode 100644
index 0000000..b65d11d
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strcat.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief strcat() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char dest[12] = "H";
+ char *src = "W";
+ char *result;
+
+ result = strcat( dest, src );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strchr.c b/testsuites/psxtests/psxhdrs/string/strchr.c
new file mode 100644
index 0000000..70ef3ed
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strchr.c
@@ -0,0 +1,38 @@
+/**
+ * @file
+ * @brief strchr() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *result;
+
+ result = strchr( dest, 2 );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strcmp.c b/testsuites/psxtests/psxhdrs/string/strcmp.c
new file mode 100644
index 0000000..2d04a76
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strcmp.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief strcmp() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *src = "World";
+ int result;
+
+ result = strcmp( dest, src );
+
+ return result;
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strcoll.c b/testsuites/psxtests/psxhdrs/string/strcoll.c
new file mode 100644
index 0000000..d597bc0
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strcoll.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief strcoll() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *src = "World";
+ int result;
+
+ result = strcoll( dest, src );
+
+ return result;
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strcoll_l.c b/testsuites/psxtests/psxhdrs/string/strcoll_l.c
new file mode 100644
index 0000000..cdda99b
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strcoll_l.c
@@ -0,0 +1,41 @@
+/**
+ * @file
+ * @brief strcoll_l() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <locale.h>
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *src = "World";
+ locale_t loc = NULL;
+ int result;
+
+ result = strcoll_l( dest, src, loc );
+
+ return result;
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strcpy.c b/testsuites/psxtests/psxhdrs/string/strcpy.c
new file mode 100644
index 0000000..792d010
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strcpy.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief strcpy() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *src = "World";
+ char *result;
+
+ result = strcpy( dest, src );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strcspn.c b/testsuites/psxtests/psxhdrs/string/strcspn.c
new file mode 100644
index 0000000..f59b307
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strcspn.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief strcspn() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *src = "World";
+ int result;
+
+ result = strcspn( dest, src );
+
+ return result;
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strdup.c b/testsuites/psxtests/psxhdrs/string/strdup.c
new file mode 100644
index 0000000..527312f
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strdup.c
@@ -0,0 +1,38 @@
+/**
+ * @file
+ * @brief strdup() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *result;
+
+ result = strdup( dest );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strerror.c b/testsuites/psxtests/psxhdrs/string/strerror.c
new file mode 100644
index 0000000..24612d5
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strerror.c
@@ -0,0 +1,38 @@
+/**
+ * @file
+ * @brief strerror() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+ #include <errno.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *result;
+
+ result = strerror( errno );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strerror_l.c b/testsuites/psxtests/psxhdrs/string/strerror_l.c
new file mode 100644
index 0000000..3cbef3e
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strerror_l.c
@@ -0,0 +1,40 @@
+/**
+ * @file
+ * @brief strerror_l() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+ #include <errno.h>
+ #include <locale.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ locale_t locale = NULL;
+ char *result;
+
+ result = strerror_l( errno, locale );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strerror_r.c b/testsuites/psxtests/psxhdrs/string/strerror_r.c
new file mode 100644
index 0000000..c6c4a75
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strerror_r.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief strerror_r() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+ #include <errno.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ int result;
+
+ result = strerror_r( errno, dest, 2 );
+
+ return result;
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strlen.c b/testsuites/psxtests/psxhdrs/string/strlen.c
new file mode 100644
index 0000000..3abbe96
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strlen.c
@@ -0,0 +1,38 @@
+/**
+ * @file
+ * @brief strlen() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ size_t result;
+
+ result = strlen( dest );
+
+ return result;
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strncat.c b/testsuites/psxtests/psxhdrs/string/strncat.c
new file mode 100644
index 0000000..fadd97f
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strncat.c
@@ -0,0 +1,40 @@
+/**
+ * @file
+ * @brief strncat() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ #define SIZE 40
+
+ int test( void );
+
+ int test( void )
+ {
+ char buffer[SIZE] = "computer";
+ char *result;
+
+ result = strncat( buffer, " program", 3 );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strncmp.c b/testsuites/psxtests/psxhdrs/string/strncmp.c
new file mode 100644
index 0000000..7f9f8f0
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strncmp.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief strncmp() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *src = "World";
+ int result;
+
+ result = strncmp( dest, src, 2 );
+
+ return result;
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strncpy.c b/testsuites/psxtests/psxhdrs/string/strncpy.c
new file mode 100644
index 0000000..da46cd8
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strncpy.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief strncpy() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *src = "World";
+ char *result;
+
+ result = strncpy( dest, src, 3 );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strndup.c b/testsuites/psxtests/psxhdrs/string/strndup.c
new file mode 100644
index 0000000..a8741c8
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strndup.c
@@ -0,0 +1,38 @@
+/**
+ * @file
+ * @brief strndup() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *result;
+
+ result = strndup( dest, 3 );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strnlen.c b/testsuites/psxtests/psxhdrs/string/strnlen.c
new file mode 100644
index 0000000..c3adda1
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strnlen.c
@@ -0,0 +1,38 @@
+/**
+ * @file
+ * @brief strnlen() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ int result;
+
+ result = strnlen( dest, 3 );
+
+ return result;
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strpbrk.c b/testsuites/psxtests/psxhdrs/string/strpbrk.c
new file mode 100644
index 0000000..37a3760
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strpbrk.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief strpbrk() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *src = "World";
+ char *result;
+
+ result = strpbrk( dest, src );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strrchr.c b/testsuites/psxtests/psxhdrs/string/strrchr.c
new file mode 100644
index 0000000..4df0f47
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strrchr.c
@@ -0,0 +1,38 @@
+/**
+ * @file
+ * @brief strrchr() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *result;
+
+ result = strrchr( dest, 3 );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strsignal.c b/testsuites/psxtests/psxhdrs/string/strsignal.c
new file mode 100644
index 0000000..c29a5d9
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strsignal.c
@@ -0,0 +1,37 @@
+/**
+ * @file
+ * @brief strsignal() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *result;
+
+ result = strsignal( 2 );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strspn.c b/testsuites/psxtests/psxhdrs/string/strspn.c
new file mode 100644
index 0000000..b458192
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strspn.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief strspn() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *src = "World";
+ int result;
+
+ result = strspn( dest, src );
+
+ return result;
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strstr.c b/testsuites/psxtests/psxhdrs/string/strstr.c
new file mode 100644
index 0000000..a4f7fe8
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strstr.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief strstr() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *src = "World";
+ char *result;
+
+ result = strstr( dest, src );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strtok.c b/testsuites/psxtests/psxhdrs/string/strtok.c
new file mode 100644
index 0000000..25f137c
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strtok.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief strtok() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *src = "World";
+ char *result;
+
+ result = strtok( dest, src );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strtok_r.c b/testsuites/psxtests/psxhdrs/string/strtok_r.c
new file mode 100644
index 0000000..5fcab99
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strtok_r.c
@@ -0,0 +1,40 @@
+/**
+ * @file
+ * @brief strtok_r() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *src = "World";
+ char *saveptr = "Door";
+ char *result;
+
+ result = strtok_r( dest, src, &saveptr );
+
+ return ( result != NULL );
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strxfrm.c b/testsuites/psxtests/psxhdrs/string/strxfrm.c
new file mode 100644
index 0000000..6f5ea03
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strxfrm.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief strxfrm() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *src = "World";
+ int result;
+
+ result = strxfrm( dest, src, 2 );
+
+ return result;
+ }
diff --git a/testsuites/psxtests/psxhdrs/string/strxfrm_l.c b/testsuites/psxtests/psxhdrs/string/strxfrm_l.c
new file mode 100644
index 0000000..c143d7b
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/string/strxfrm_l.c
@@ -0,0 +1,41 @@
+/**
+ * @file
+ * @brief strxfrm_l() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <string.h>
+ #include <locale.h>
+
+ int test( void );
+
+ int test( void )
+ {
+ char *dest = "Hello";
+ char *src = "World";
+ locale_t locale = NULL;
+ int result;
+
+ result = strxfrm_l( dest, src, 2, locale );
+
+ return result;
+ }
More information about the vc
mailing list