]> pd.if.org Git - pdclib/blobdiff - testing/scanf_testcases.h
Reworked scanf() testing. General cleanups.
[pdclib] / testing / scanf_testcases.h
diff --git a/testing/scanf_testcases.h b/testing/scanf_testcases.h
new file mode 100644 (file)
index 0000000..4cb662e
--- /dev/null
@@ -0,0 +1,8 @@
+{
+    char buffer[100];
+#ifndef TEST_CONVERSION_ONLY
+    SCANF_TEST( 0, "foo", "foo", NULL );
+#endif
+    SCANF_TEST( 1, "foo", "%3c", buffer );
+    TESTCASE( memcmp( buffer, "foo", 3 ) == 0 );
+}