From 187ef318e6df14db82592dc58e989abf16574b4a Mon Sep 17 00:00:00 2001 From: Jacob Shin Date: Thu, 6 Dec 2018 01:44:41 -0500 Subject: psxhdrs: Add POSIX API Signature Compliance Tests for wctype.h (GCI 2018) --- testsuites/psxtests/psxhdrs/wctype/wctype_l.c | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 testsuites/psxtests/psxhdrs/wctype/wctype_l.c (limited to 'testsuites/psxtests/psxhdrs/wctype/wctype_l.c') diff --git a/testsuites/psxtests/psxhdrs/wctype/wctype_l.c b/testsuites/psxtests/psxhdrs/wctype/wctype_l.c new file mode 100755 index 0000000000..1a5d5a2382 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/wctype/wctype_l.c @@ -0,0 +1,38 @@ +/** + * @file + * @brief wctype_l() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Jacob Shin + * + * 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 +#include + +int test( void ); + +int test( void ) +{ + wctype_t return_value; + locale_t loc = newlocale(LC_ALL_MASK, "C", (locale_t) 0); + + return_value = wctype_l("alnum", loc); + return (return_value != 0); +} \ No newline at end of file -- cgit v1.2.3