* tests/test-c-ctype.c (test_all): Port c_isascii test to EBCDIC.
Add a test to count the number of ASCII characters.
+2015-09-23 Paul Eggert <eggert@cs.ucla.edu>
+
+ c-ctype: improve c_isascii testing
+ * tests/test-c-ctype.c (test_all): Port c_isascii test to EBCDIC.
+ Add a test to count the number of ASCII characters.
+
2015-09-22 Paul Eggert <eggert@cs.ucla.edu>
savewd: remove SAVEWD_CHDIR_READABLE
test_all (void)
{
int c;
+ int n_isascii = 0;
for (c = -0x80; c < 0x100; c++)
{
ASSERT (to_char (c_toupper (c)) == to_char (c_toupper (c + 0x100)));
}
- ASSERT (c_isascii (c) == (c >= 0 && c < 0x80));
+ if (0 <= c)
+ n_isascii += c_isascii (c);
+
+ ASSERT (c_isascii (c) == (c_isprint (c) || c_iscntrl (c)));
ASSERT (c_isalnum (c) == (c_isalpha (c) || c_isdigit (c)));
break;
}
}
+
+ ASSERT (n_isascii == 128);
}
int