summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/tests/glcpp-test-cr-lf
Commit message (Collapse)AuthorAgeFilesLines
* glsl: move to compiler/Emil Velikov2016-01-261-141/+0
| | | | | | Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
* glcpp: Make tests write .out files to builddir.Matt Turner2014-12-121-3/+3
|
* glcpp: Fix glcpp-test-cr-lf "make check" test for Mac OS XCarl Worth2014-08-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | There were two problems with the way this script used sed on OS X: 1. The OS X sed doesn't interpret "\r" in a replacement list as a carriage-return character, (instead it was inserting a literal 'r' character). We fix this by putting an actual ^M character into the source of the script, (rather than a two-character escape sequence hoping for sed to do the right thing). 2. When generating the test files with LF-CR ("\n\r") newlines, the OS X sed was adding an undesired final newline ("\n") at the end of the file. We avoid this by first using sed to add the ^M before the newlines, then using tr to swap the \r and \n characters. This way, sed never sees any lines ending with anything but \n, so it doesn't get confused and doesn't add any bogus extra newlines. Tested-by: Vinson Lee <vlee@freedesktop.org> Vinson's testing confirmed that this patch fixes FreeBSD as well.
* glsl/glcpp: Integrate recent glcpp-test-cr-lf test into "make check"Carl Worth2014-08-071-13/+36
| | | | | | | | | | | | Beyond just listing this in the TESTS variable in Makefile.am, only minor changes were needed to make this work. The primary issue is that the build system runs the test script from a different directory than the script itself. So we have to use the $srcdir variable to find the test input files. Using $srcdir in this way also ensures that this test works when using an out-of-tree build. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl/glcpp: Add test script for testing various line-termination charactersCarl Worth2014-08-071-0/+118
The GLSL specification has a very broad definition of what is a newline. Namely, it can be the carriage-return character, '\r', the newline character, '\n', or any combination of the two, (though in combination, the two are treated as a single newline). Here, we add a new test-runner, glcpp-test-cr-lf, that, for each possible line-termination combination, runs through the existing test suite with all source files modified to use those line-termination characters. Instead of using the .expected files for this, this script assumes that the regular test suite has been run already and expects the output to match the .out files. This avoids getting 4 test failures for any one bug, and instead will hopefully only report bugs actually related to the line-termination characters. The new testing is not yet integrated into "make check". For that, some munging of the testdir option will be necessary, (to support "make check" with out-of-tree builds). For now, the scripts can just be run directly by hand. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>