1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:57:45 +00:00

LibC: Implement wctrans

This commit is contained in:
Tim Schumacher 2021-09-17 18:19:09 +02:00 committed by Brian Gianforcaro
parent 7b17230d7a
commit ff0ab8b9a9
2 changed files with 25 additions and 3 deletions

View file

@ -28,3 +28,14 @@ TEST_CASE(wctype)
EXPECT(wctype("") == 0);
EXPECT(wctype("abc") == 0);
}
TEST_CASE(wctrans)
{
// Test that existing character mappings return non-zero wctrans values.
EXPECT(wctrans("tolower") != 0);
EXPECT(wctrans("toupper") != 0);
// Test that invalid character mappings return the "invalid" wctrans value (0).
EXPECT(wctrans("") == 0);
EXPECT(wctrans("abc") == 0);
}