glsl/glcpp: Test that macro parameters substitute immediately after periods

At one point while rewriting the lexing rule for pre-processing numbers, I
made it a bit too aggressive and within a replacement list sucked up a
parameter name that appeared immediately after a period. This caused the
parameter name to be unreplaced when the macro was expanded.

It was in some piglit tests that I originally found this issue. Here, I'm
adding a test to "make check" to ensure that this behavior remains correct.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Carl Worth
2014-06-26 10:08:34 -07:00
parent 285c9392ad
commit 346d712e87
2 changed files with 8 additions and 0 deletions
@@ -0,0 +1,4 @@
#define FIELD(x) foo.x
#define FIELD_OF(s, x) s.x
FIELD(bar)
FIELD_OF(foo, bar)
@@ -0,0 +1,4 @@
foo.bar
foo.bar