1
0

hacked new tests in

This commit is contained in:
dtb 2022-10-23 02:07:25 -04:00
parent c1f1794863
commit 14045fdc92
3 changed files with 15 additions and 0 deletions

2
str/isempty.c Normal file
View File

@ -0,0 +1,2 @@
#define _isempty_c
int isempty(int c){ return 0; }

2
str/isvalue.c Normal file
View File

@ -0,0 +1,2 @@
#define _isvalue_c
int isvalue(int c){ return 1; }

View File

@ -10,6 +10,11 @@
static char *program_name = "str";
/* don't use this */
#include "isempty.c"
#include "isvalue.c"
static struct {
char *name;
int (*f)(int);
@ -20,12 +25,18 @@ static struct {
{ "iscntrl", iscntrl },
{ "isdigit", isdigit },
{ "isxdigit", isxdigit },
#if defined _isempty_c
{ "isempty", isempty },
#endif
{ "isgraph", isgraph },
{ "islower", islower },
{ "isprint", isprint },
{ "ispunct", ispunct },
{ "isspace", isspace },
{ "isupper", isupper }
#if defined _isvalue_c
, { "isvalue", isvalue }
#endif
};
int main(int argc, char *argv[]){