projects
/
fw
/
pdclib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removing testfile properly.
[fw/pdclib]
/
functions
/
string
/
strspn.c
diff --git
a/functions/string/strspn.c
b/functions/string/strspn.c
index b8e703d1f09411a7e4d82678009cdfd3f5417e28..a546e94f45ce9cd6c0e74e5b828b3472eb314788 100644
(file)
--- a/
functions/string/strspn.c
+++ b/
functions/string/strspn.c
@@
-1,7
+1,5
@@
/* $Id$ */
/* $Id$ */
-/* Release $Name$ */
-
/* strspn( const char *, const char * )
This file is part of the Public Domain C Library (PDCLib).
/* strspn( const char *, const char * )
This file is part of the Public Domain C Library (PDCLib).
@@
-10,6
+8,8
@@
#include <string.h>
#include <string.h>
+#ifndef REGTEST
+
size_t strspn( const char * s1, const char * s2 )
{
size_t len = 0;
size_t strspn( const char * s1, const char * s2 )
{
size_t len = 0;
@@
-34,11
+34,16
@@
size_t strspn( const char * s1, const char * s2 )
return len;
}
return len;
}
-#
warning Test driver missing.
+#
endif
#ifdef TEST
#ifdef TEST
-int main()
+#include <_PDCLIB_test.h>
+
+int main( void )
{
{
- return 0;
+ TESTCASE( strspn( abcde, "abc" ) == 3 );
+ TESTCASE( strspn( abcde, "b" ) == 0 );
+ TESTCASE( strspn( abcde, abcde ) == 5 );
+ return TEST_RESULTS;
}
#endif
}
#endif