glsl/glcpp: Add testing for directives preceded by a space
authorCarl Worth <cworth@cworth.org>
Mon, 28 Jul 2014 16:38:30 +0000 (09:38 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 29 Jul 2014 22:11:48 +0000 (15:11 -0700)
This test simply has one of each directive, all of which are preceded by a
single space character.

src/glsl/glcpp/tests/128-space-before-hash.c [new file with mode: 0644]
src/glsl/glcpp/tests/128-space-before-hash.c.expected [new file with mode: 0644]

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 (file)
index 0000000..fba9596
--- /dev/null
@@ -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 (file)
index 0000000..71be4c5
--- /dev/null
@@ -0,0 +1,22 @@
+  
+#version 300
+ #pragma Testing spaces before hash
+
+#line 3
+
+
+ yes
+
+
+
+ yes again
+
+
+
+ for the third time, yes!
+
+
+
+ yes, of course
+
+