]> pd.if.org Git - pdclib/blobdiff - functions/_PDCLIB/digits.c
REGTEST wrapping.
[pdclib] / functions / _PDCLIB / digits.c
index b58886b052a248f9c782eaca5dc38e92f188e780..4837d461323d02fbea4fcd03c6f4b405f3bdb5ef 100644 (file)
@@ -1,22 +1,32 @@
-/* $Id$ */
-
-/* Release $Name$ */
-
 /* _PDCLIB_digits
 
    This file is part of the Public Domain C Library (PDCLib).
    Permission is granted to use, modify, and / or redistribute at will.
 */
 
-char _PDCLIB_digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+#ifndef REGTEST
+
+#include "_PDCLIB_int.h"
+
+const char _PDCLIB_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
+
+/* For _PDCLIB/print.c only; obsolete with ctype.h */
+const char _PDCLIB_Xdigits[] = "0123456789ABCDEF";
+
+#endif
 
 #ifdef TEST
-#include <_PDCLIB_test.h>
 
-int main()
+#include "_PDCLIB_test.h"
+
+#include <string.h>
+
+int main( void )
 {
-    BEGIN_TESTS;
-    /* no tests for raw data */
+#ifndef REGTEST
+    TESTCASE( strcmp( _PDCLIB_digits, "0123456789abcdefghijklmnopqrstuvwxyz" ) == 0 );
+    TESTCASE( strcmp( _PDCLIB_Xdigits, "0123456789ABCDEF" ) == 0 );
+#endif
     return TEST_RESULTS;
 }