summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/tests/131-eof-without-newline.c
diff options
context:
space:
mode:
authorCarl Worth <[email protected]>2014-06-20 14:28:20 -0700
committerCarl Worth <[email protected]>2014-07-29 15:11:48 -0700
commit5dbdc341e8e8502ab5d98784a24b54c6f3907472 (patch)
treede3a0c6f1307fb234e030a2cd318949e082fafba /src/glsl/glcpp/tests/131-eof-without-newline.c
parent21dda50549c5f220eff7ec04a72fb02e5eb09e76 (diff)
glsl/glcpp: Add testing for EOF sans newline (and fix for <DEFINE>, <COMMENT>)
The glcpp implementation has long had code to support a file that ends without a final newline. But we didn't have a "make check" test for this. Additionally, the <EOF> action was restricted only to the <INITIAL> state so it would fail to get invoked if the EOF was encountered in the <COMMENT> or the <DEFINE> case. Neither of these was a bug, per se, since EOF in either of these cases is an error anyway, (either "unterminated comment" or "missing macro name for #define"). But with the new explicit support for these cases, we not generate clean error messages in these cases, (rather than "unexpected $end" from before). Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/glsl/glcpp/tests/131-eof-without-newline.c')
-rw-r--r--src/glsl/glcpp/tests/131-eof-without-newline.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/glcpp/tests/131-eof-without-newline.c b/src/glsl/glcpp/tests/131-eof-without-newline.c
new file mode 100644
index 00000000000..240292dad01
--- /dev/null
+++ b/src/glsl/glcpp/tests/131-eof-without-newline.c
@@ -0,0 +1 @@
+this file ends with no newline \ No newline at end of file