From: Simon Ruderich Date: Sun, 15 Mar 2009 13:51:59 +0000 (+0100) Subject: tests: Add test for m4() with multiple arguments. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=b838856137ed1aaee7336c1f48794a30b9f4b232;p=config%2Fdotfiles.git tests: Add test for m4() with multiple arguments. --- diff --git a/tests/lib.sh.test b/tests/lib.sh.test index 3140c23..4557698 100644 --- a/tests/lib.sh.test +++ b/tests/lib.sh.test @@ -31,5 +31,13 @@ FI" > tmp/test.m4 m4 tmp/test -DTEST=m4 # Remove the line with the current date as it changes every time. cat tmp/test | grep -v "It was generated from tmp/test.m4" +# Test multiple arguments to m4(). +echo "Test with multiple arguments passed to m4. +first: FIRST +second: SECOND +" > tmp/test-multiple.m4 +m4 tmp/test-multiple -DFIRST=first -DSECOND=second +# Remove the line with the current date as it changes every time. +cat tmp/test-multiple | grep -v "It was generated from tmp/test-multiple.m4" # vim: ft=sh diff --git a/tests/lib.sh.test.out b/tests/lib.sh.test.out index 0bd50a9..e68b995 100644 --- a/tests/lib.sh.test.out +++ b/tests/lib.sh.test.out @@ -10,3 +10,13 @@ m4(): generating 'tmp/test' from 'tmp/test.m4' with options '-DTEST=m4' Simple test file for m4. m4 +m4(): generating 'tmp/test-multiple' from 'tmp/test-multiple.m4' with options '-DFIRST=first -DSECOND=second' +################################### +# WARNING! DO NOT EDIT THIS FILE! # +################################### + + +Test with multiple arguments passed to m4. +first: first +second: second +