X-Git-Url: https://pd.if.org/git/?p=lice;a=blobdiff_plain;f=tests%2Fline.c;fp=tests%2Fline.c;h=75921bf81bc899f3a734352b53ad27ab179a8b5c;hp=0000000000000000000000000000000000000000;hb=946bdbe1d5dd89ab671391fbe429a1c2c48ecaa7;hpb=f1abb26903687c7967cf37c3f6c830051bdeb371 diff --git a/tests/line.c b/tests/line.c new file mode 100644 index 0000000..75921bf --- /dev/null +++ b/tests/line.c @@ -0,0 +1,35 @@ +// line continuation + +int \ +main \ +( \ + void // \ + \ + // one empty space to compensate +) { \ + int \ + a \ + = \ + 0, \ + *b \ + = \ + &a; \ + + expecti(*b, a); // line continuation should make the above + // int a=0,*b=&a; + + /* \ + * \ + * \\ int *e=b; / + */ + + // would error if int *e made it as code + int e = 0; // \ + comments \ + comments \ + e = 1; + + expecti(e, 0); // error if e = 1 made it + + return e; // e == 0 (success) +}