add missing test from -fdollar-in-identifiers commit

Commit 5ce2154c ("-fdollar-in-identifiers addon", 20-04-2015) forgot
to include the test files from Daniel's patch.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
This commit is contained in:
Ramsay Jones 2015-04-20 12:02:57 +01:00
parent 5ce2154c74
commit 5e8fb713c4
2 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,41 @@
#include <stdio.h>
#define $(x) x
#define $fred 10
#define joe$ 20
#define hen$y 30
#define $10(x) x*10
#define _$10(x) x/10
int main()
{
printf("fred=%d\n", $fred);
printf("joe=%d\n", joe$);
printf("henry=%d\n", hen$y);
printf("fred2=%d\n", $($fred));
printf("joe2=%d\n", $(joe$));
printf("henry2=%d\n", $(hen$y));
printf("fred10=%d\n", $10($fred));
printf("joe_10=%d\n", _$10(joe$));
int $ = 10;
int a100$ = 100;
int a$$ = 1000;
int a$c$b = 2121;
int $100 = 10000;
const char *$$$ = "money";
printf("local=%d\n", $);
printf("a100$=%d\n", a100$);
printf("a$$=%d\n", a$$);
printf("a$c$b=%d\n", a$c$b);
printf("$100=%d\n", $100);
printf("$$$=%s", $$$);
return 0;
}
/* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/

View File

@ -0,0 +1,14 @@
fred=10
joe=20
henry=30
fred2=10
joe2=20
henry2=30
fred10=100
joe_10=2
local=10
a100$=100
a$$=1000
a$c$b=2121
$100=10000
$$$=money