aboutsummaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/test/run-ctype-test.c12
-rw-r--r--libc/test/run-ctype.c10
2 files changed, 22 insertions, 0 deletions
diff --git a/libc/test/run-ctype-test.c b/libc/test/run-ctype-test.c
index 999292b..bbe91d3 100644
--- a/libc/test/run-ctype-test.c
+++ b/libc/test/run-ctype-test.c
@@ -35,6 +35,8 @@ int skiboot_isdigit(int ch);
int skiboot_isprint(int ch);
int skiboot_isspace(int ch);
int skiboot_isxdigit(int ch);
+int skiboot_tolower(int ch);
+int skiboot_toupper(int ch);
int skiboot_isdigit(int ch)
{
@@ -55,3 +57,13 @@ int skiboot_isxdigit(int ch)
{
return isxdigit(ch);
}
+
+int skiboot_tolower(int ch)
+{
+ return tolower(ch);
+}
+
+int skiboot_toupper(int ch)
+{
+ return toupper(ch);
+}
diff --git a/libc/test/run-ctype.c b/libc/test/run-ctype.c
index eac04ec..3851a5d 100644
--- a/libc/test/run-ctype.c
+++ b/libc/test/run-ctype.c
@@ -27,6 +27,8 @@ int skiboot_isdigit(int ch);
int skiboot_isprint(int ch);
int skiboot_isspace(int ch);
int skiboot_isxdigit(int ch);
+int skiboot_tolower(int ch);
+int skiboot_toupper(int ch);
int main(void)
{
@@ -92,5 +94,13 @@ int main(void)
assert(!r2);
}
+ for (i = 0; i < 257; i++) {
+ assert(skiboot_tolower(i) == tolower(i));
+ }
+
+ for (i = 0; i < 257; i++) {
+ assert(skiboot_toupper(i) == toupper(i));
+ }
+
return 0;
}