]> pd.if.org Git - pdclib/blobdiff - functions/_PDCLIB/digits.c
* Test cleanups: surround the code for all functions by #ifndef REGTEST
[pdclib] / functions / _PDCLIB / digits.c
index 6f360646f65514c66a2c8859724edf3f3b676c47..52a7ae38585a13978b8069bb3066a9a5bf193271 100644 (file)
@@ -6,14 +6,27 @@
    Permission is granted to use, modify, and / or redistribute at will.
 */
 
+#ifndef REGTEST
+#include <_PDCLIB_int.h>
+#endif
+
 char _PDCLIB_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
 
+/* For _PDCLIB/print.c only; obsolete with ctype.h */
+char _PDCLIB_Xdigits[] = "0123456789ABCDEF";
+
 #ifdef TEST
+#include <_PDCLIB_test.h>
+
+#include <string.h>
 
 int main( void )
 {
-    /* no tests for raw data */
-    return 0;
+#ifndef REGTEST
+    TESTCASE( strcmp( _PDCLIB_digits, "0123456789abcdefghijklmnopqrstuvwxyz" ) == 0 );
+    TESTCASE( strcmp( _PDCLIB_Xdigits, "0123456789ABCDEF" ) == 0 );
+#endif
+    return TEST_RESULTS;
 }
 
 #endif