Add spellcheck example

One of the benefits of implementing system call support from scratch is
that we're able to have embedded zip filesystem support which trickles
into libraries such as stdio, without unportable symbolic interposition.
It's also be great if we could say open("gs://bucket/object", O_RDONLY)
for seamless GCS, similar to Java NIO, but abstracted by the C library.
This commit is contained in:
Justine Tunney 2020-06-27 12:00:43 -07:00
parent 0ad0408ac6
commit b5b60015f5
6 changed files with 180 additions and 1 deletions

View file

@ -30,6 +30,12 @@
wint_t wc;
TEST(tpdecode, testEmptyString_consumesNulTerminator) {
wc = 123;
EXPECT_EQ(1, tpdecode("", &wc));
EXPECT_EQ(0, wc);
}
TEST(tpdecode, testGlyph) {
EXPECT_EQ(u'', PROGN(ASSERT_EQ(3, tpdecode("", &wc)), wc));
EXPECT_EQ(L'𐌰', PROGN(ASSERT_EQ(4, tpdecode("𐌰𐌱𐌲𐌳", &wc)), wc));