X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fh2ph.h;h=495789a206df61d8327365bba0e8bd0aaa8474f2;hb=04d1c4156e381ac787d2439f25f8152211f495f8;hp=128ec5f1ae226d06822136f21bcde5632c837b9c;hpb=79c1b905064b9400e9fab8968bd2c8bffaaa289a;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/lib/h2ph.h b/t/lib/h2ph.h index 128ec5f..495789a 100644 --- a/t/lib/h2ph.h +++ b/t/lib/h2ph.h @@ -56,6 +56,11 @@ # define WHATEVER 1000 #endif +/* Test passing through the alien constructs (perlbug #34493) */ +#ifdef __LANGUAGE_PASCAL__ +function Tru64_Pascal(n: Integer): Integer; +#endif + /* * Test #include, #import and #include_next * #include_next is difficult to test, it really depends on the actual @@ -82,4 +87,54 @@ typedef struct a_struct { typedef enum _days_of_week { sun, mon, tue, wed, thu, fri, sat, Sun=0, Mon, Tue, Wed, Thu, Fri, Sat } days_of_week; +/* + * Some moderate flexing of tri-graph pre substitution. + */ +??=ifndef _SOMETHING_TRIGRAPHIC +??=define _SOMETHING_TRIGRAPHIC +??= define SOMETHING_ELSE_TRIGRAPHIC_0 "??!" /* | ??!| || */ + ??=define SOMETHING_ELSE_TRIGRAPHIC_1 "??'" /* | ??'| ^| */ +??= define SOMETHING_ELSE_TRIGRAPHIC_2 "??(" /* | ??(| [| */ + ??= define SOMETHING_ELSE_TRIGRAPHIC_3 "??)" /* | ??)| ]| */ +??=define SOMETHING_ELSE_TRIGRAPHIC_4 "??-0" /* | ??-| ~| */ + ??= define SOMETHING_ELSE_TRIGRAPHIC_5 "??/ " /* | ??/| \| */ +??= define SOMETHING_ELSE_TRIGRAPHIC_6 "??<" /* | ??<| {| */ +??=define SOMETHING_ELSE_TRIGRAPHIC_7 "??=" /* | ??=| #| */ +??= define SOMETHING_ELSE_TRIGRAPHIC_8 "??>" /* | ??>| }| */ + ??=endif + +// test C++-style comment + +#if 1 +typdef struct empty_struct { +} // trailing C++-style comment should not force continuation +#endif + +/* comments (that look like string) inside enums... */ + +enum { + /* foo; + can't + */ + }; + +enum flimflam { + flim, + /* foo; + can't + */ + flam + } flamflim; + +/* Handle multi-line quoted strings: */ +__asm__ __volatile__(" + this + produces + no + output +"); + +#define multiline "multiline +string" + #endif /* _H2PH_H_ */