added tests as prepared by oliver

This commit is contained in:
mrdudz
2014-09-24 16:45:10 +02:00
parent d75f9c2051
commit 9b82eaadd0
121 changed files with 25206 additions and 0 deletions

59
test/ref/charconst.c Normal file
View File

@@ -0,0 +1,59 @@
/*
!!DESCRIPTION!! check if character constants are translated correctly
!!ORIGIN!! cc65 bug report
!!LICENCE!! Public Domain
*/
#include <limits.h>
#include <ctype.h>
void backslash(unsigned char c)
{
printf("%c : ",c);
switch (c)
{
case 'b':
c = '\b';
case 'f':
c = '\f';
case 'n':
c = '\n';
case 'r':
c = '\r';
case 't':
c = '\t';
case 'v':
#ifndef NO_BACKSLASH_V
c = '\v';
#else
c = 0x0b;
#endif
}
if(!isprint(c))
{
printf("ok.\n");
}
else
{
printf("failed.\n");
}
}
void testbackslash(void)
{
backslash('b');
backslash('f');
backslash('n');
backslash('r');
backslash('t');
backslash('v');
}
int main(void)
{
testbackslash();
return 0;
}