summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Worth <[email protected]>2014-07-28 09:38:30 -0700
committerCarl Worth <[email protected]>2014-07-29 15:11:48 -0700
commit9e45fb6f5127cecd02a1420aaea59a7012e74404 (patch)
treee75b28fc4cde415b644942d93c3ab763c0a1cdcb
parentda7f226a2711450bf92dcc9e2e1e1052111683ff (diff)
glsl/glcpp: Add testing for directives preceded by a space
This test simply has one of each directive, all of which are preceded by a single space character.
-rw-r--r--src/glsl/glcpp/tests/128-space-before-hash.c21
-rw-r--r--src/glsl/glcpp/tests/128-space-before-hash.c.expected22
2 files changed, 43 insertions, 0 deletions
diff --git a/src/glsl/glcpp/tests/128-space-before-hash.c b/src/glsl/glcpp/tests/128-space-before-hash.c
new file mode 100644
index 00000000000..fba9596baf8
--- /dev/null
+++ b/src/glsl/glcpp/tests/128-space-before-hash.c
@@ -0,0 +1,21 @@
+ /* Any directive can be preceded by a space. */
+ #version 300
+ #pragma Testing spaces before hash
+ #
+ #line 3
+ #define FOO
+ #ifdef FOO
+ yes
+ #endif
+ #if 0
+ #elif defined FOO
+ yes again
+ #endif
+ #if 0
+ #else
+ for the third time, yes!
+ #endif
+ #undef FOO
+ #ifndef FOO
+ yes, of course
+ #endif
diff --git a/src/glsl/glcpp/tests/128-space-before-hash.c.expected b/src/glsl/glcpp/tests/128-space-before-hash.c.expected
new file mode 100644
index 00000000000..71be4c524f2
--- /dev/null
+++ b/src/glsl/glcpp/tests/128-space-before-hash.c.expected
@@ -0,0 +1,22 @@
+
+#version 300
+ #pragma Testing spaces before hash
+
+#line 3
+
+
+ yes
+
+
+
+ yes again
+
+
+
+ for the third time, yes!
+
+
+
+ yes, of course
+
+