diff options
author | Jacob Shin <jacobshin313@gmail.com> | 2018-12-06 01:44:41 -0500 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2018-12-06 09:20:50 -0600 |
commit | 187ef318e6df14db82592dc58e989abf16574b4a (patch) | |
tree | 54c2d06d9217fe1f7bbf593e2751ba67d3ceca22 /testsuites/psxtests/psxhdrs/wctype/wctype_l.c | |
parent | score: Use __typeof__ for strict ISO C compat (diff) | |
download | rtems-187ef318e6df14db82592dc58e989abf16574b4a.tar.bz2 |
psxhdrs: Add POSIX API Signature Compliance Tests for wctype.h (GCI 2018)
Diffstat (limited to '')
-rwxr-xr-x | testsuites/psxtests/psxhdrs/wctype/wctype_l.c | 38 |
1 files changed, 38 insertions, 0 deletions
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 <wctype.h> +#include <locale.h> + +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 |