aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-09-24 18:32:11 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-09-24 18:32:11 -0700
commita64d1fa011705c88e16f7884d8f34e036937ab3f (patch)
tree0c1d0bdd06ff2e1af9bf6ffbb82fa7e70a069c10
parentebd34c54c3768071a53e02655e2b615e87e2d8a3 (diff)
disable glibc-specific parts of test_ctype
-rw-r--r--tests/ctype/output.txt106
-rw-r--r--tests/ctype/src.c5
2 files changed, 5 insertions, 106 deletions
diff --git a/tests/ctype/output.txt b/tests/ctype/output.txt
index 5f98d20d..43775583 100644
--- a/tests/ctype/output.txt
+++ b/tests/ctype/output.txt
@@ -1,7 +1,5 @@
ab1
AB1
-cd2
-CD2
toascii(-45): 83
toascii( 10): 10
@@ -127,107 +125,3 @@ isascii('A'): 1
isascii('5'): 1
isascii('.'): 1
isascii(183): 0
-
-islower(-45): 0
-islower( 10): 0
-islower('a'): 1
-islower('A'): 0
-islower('5'): 0
-islower('.'): 0
-islower(183): 0
-
-isupper(-45): 0
-isupper( 10): 0
-isupper('a'): 0
-isupper('A'): 1
-isupper('5'): 0
-isupper('.'): 0
-isupper(183): 0
-
-isupper(-45): 0
-isupper( 10): 0
-isupper('a'): 0
-isupper('A'): 1
-isupper('5'): 0
-isupper('.'): 0
-isupper(183): 0
-
-isalpha(-45): 0
-isalpha( 10): 0
-isalpha('a'): 1
-isalpha('A'): 1
-isalpha('5'): 0
-isalpha('.'): 0
-isalpha(183): 0
-
-isdigit(-45): 0
-isdigit( 10): 0
-isdigit('a'): 0
-isdigit('A'): 0
-isdigit('5'): 1
-isdigit('.'): 0
-isdigit(183): 0
-
-isxdigit(-45): 0
-isxdigit( 10): 0
-isxdigit('a'): 1
-isxdigit('A'): 1
-isxdigit('5'): 1
-isxdigit('.'): 0
-isxdigit(183): 0
-
-isalnum(-45): 0
-isalnum( 10): 0
-isalnum('a'): 1
-isalnum('A'): 1
-isalnum('5'): 1
-isalnum('.'): 0
-isalnum(183): 0
-
-ispunct(-45): 0
-ispunct( 10): 0
-ispunct('a'): 0
-ispunct('A'): 0
-ispunct('5'): 0
-ispunct('.'): 1
-ispunct(183): 0
-
-isspace(-45): 0
-isspace( 10): 1
-isspace('a'): 0
-isspace('A'): 0
-isspace('5'): 0
-isspace('.'): 0
-isspace(183): 0
-
-isblank(-45): 0
-isblank( 10): 0
-isblank('a'): 0
-isblank('A'): 0
-isblank('5'): 0
-isblank('.'): 0
-isblank(183): 0
-
-iscntrl(-45): 0
-iscntrl( 10): 1
-iscntrl('a'): 0
-iscntrl('A'): 0
-iscntrl('5'): 0
-iscntrl('.'): 0
-iscntrl(183): 0
-
-isprint(-45): 0
-isprint( 10): 0
-isprint('a'): 1
-isprint('A'): 1
-isprint('5'): 1
-isprint('.'): 1
-isprint(183): 0
-
-isgraph(-45): 0
-isgraph( 10): 0
-isgraph('a'): 1
-isgraph('A'): 1
-isgraph('5'): 1
-isgraph('.'): 1
-isgraph(183): 0
diff --git a/tests/ctype/src.c b/tests/ctype/src.c
index 4dce6999..34436c3b 100644
--- a/tests/ctype/src.c
+++ b/tests/ctype/src.c
@@ -6,10 +6,12 @@ int main() {
printf("%c%c%c\n", tolower('a'), tolower('B'), tolower('1'));
printf("%c%c%c\n", toupper('a'), toupper('B'), toupper('1'));
+ /* These appear to require glibc headers and fail with newlib
const int* tl = *__ctype_tolower_loc();
printf("%c%c%c\n", (char)tl['c'], (char)tl['D'], (char)tl['2']);
const int* tu = *__ctype_toupper_loc();
printf("%c%c%c\n", (char)tu['c'], (char)tu['D'], (char)tu['2']);
+ */
printf("\n");
@@ -71,6 +73,8 @@ int main() {
printf("isascii('.'): %d\n", isascii('.') != 0);
printf("isascii(183): %d\n", isascii(183) != 0);
+ /* These appear to require glibc headers and fail with newlib
+
// These are manually preprocessed to use __ctype_b_loc. The flags combination
// that the test runner uses seems to cause the macro to be ignored.
printf("\n");
@@ -189,6 +193,7 @@ int main() {
printf("isgraph('5'): %d\n", ((*__ctype_b_loc ())[(int) (('5'))] & (unsigned short int) _ISgraph) != 0);
printf("isgraph('.'): %d\n", ((*__ctype_b_loc ())[(int) (('.'))] & (unsigned short int) _ISgraph) != 0);
printf("isgraph(183): %d\n", ((*__ctype_b_loc ())[(int) ((183))] & (unsigned short int) _ISgraph) != 0);
+ */
return 0;
}