tests: one more use of 'unindent' function
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 14 Mar 2012 21:48:22 +0000 (22:48 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 14 Mar 2012 21:48:22 +0000 (22:48 +0100)
* tests/yacc-d-cxx.test (write_parse, write_main): Use 'unindent'
instead of ad-hoc sed invocation to strip extra leading whitespace.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
tests/yacc-d-cxx.test

index 38d63f3..51d78f1 100755 (executable)
@@ -24,7 +24,7 @@ required=yacc
 write_parse ()
 {
   header=$1
-  sed 's/^ *//' <<END
+  unindent <<END
     %{
     // Valid C++, but deliberately invalid C.
     #include <cstdlib>
@@ -41,7 +41,7 @@ END
 write_main ()
 {
   header=$1
-  sed 's/^ *//' <<END
+  unindent <<END
     // Valid C++, but deliberately invalid C.
     #include <cstdio>
     #include "$header"