diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/063-comments.c | 15 | ||||
| -rwxr-xr-x | tests/glcpp-test | 4 | 
2 files changed, 17 insertions, 2 deletions
| diff --git a/tests/063-comments.c b/tests/063-comments.c new file mode 100644 index 0000000000..4cda52236e --- /dev/null +++ b/tests/063-comments.c @@ -0,0 +1,15 @@ +/* this is a comment */ +// so is this +// */ +f = g/**//h; +/*//*/l(); +m = n//**/o ++ p; +/* this +comment spans +multiple lines and +contains *** stars +and slashes / *** / +and other stuff. +****/ +more code here diff --git a/tests/glcpp-test b/tests/glcpp-test index ba398af0d5..24110333a5 100755 --- a/tests/glcpp-test +++ b/tests/glcpp-test @@ -3,8 +3,8 @@  for test in *.c; do      echo "Testing $test"      ../glcpp < $test > $test.glcpp -    grep -v '^$' < $test.glcpp > $test.out || true +    grep -v '^ *$' < $test.glcpp > $test.out || true      gcc -E $test -o $test.gcc -    grep -v '^#' < $test.gcc | grep -v '^$' > $test.expected || true +    grep -v '^#' < $test.gcc | grep -v '^$' | sed -r -e 's/^ +/ /' > $test.expected || true      diff -u $test.expected $test.out  done | 
