diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-09-23 04:14:02 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-09-23 04:14:02 +0000 |
commit | e53b1526c0a9b14561751665d142d68ec81f9c54 (patch) | |
tree | fe873fc82adee722b372c72691a8be663675f530 /eclass/tests | |
parent | add die and has_version helpers (diff) | |
download | gentoo-2-e53b1526c0a9b14561751665d142d68ec81f9c54.tar.gz gentoo-2-e53b1526c0a9b14561751665d142d68ec81f9c54.tar.bz2 gentoo-2-e53b1526c0a9b14561751665d142d68ec81f9c54.zip |
handle multiline ACLOCAL_AMFLAGS #383525 by Mikael Morin
Diffstat (limited to 'eclass/tests')
-rwxr-xr-x | eclass/tests/autotools:eaclocal_amflags.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/eclass/tests/autotools:eaclocal_amflags.sh b/eclass/tests/autotools:eaclocal_amflags.sh new file mode 100755 index 000000000000..ac0ab767aa55 --- /dev/null +++ b/eclass/tests/autotools:eaclocal_amflags.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +source tests-common.sh + +inherit autotools + +test-it() { + ebegin "Testing eaclocal_amflags $1: $2" + printf "ACLOCAL_AMFLAGS = %b\n" "$2" > Makefile.am + local flags=$(eaclocal_amflags) exp=${3:-$2} + [[ "${flags}" == "${exp}" ]] + if ! eend $? ; then + printf '### INPUT:\n%s\n' "$2" + printf '### FILE:\n%s\n' "$(<Makefile.am)" + printf '### EXPECTED:\n%s\n' "${exp}" + printf '### ACTUAL:\n%s\n' "${flags}" + fi + rm Makefile.am +} + +test-it simple "-Im4" +test-it simple "-I m4 -I lakdjfladsfj /////" + +test-it shell-exec '`echo hi`' "hi" +test-it shell-exec '`echo {0..3}`' "0 1 2 3" + +test-it multiline '-I oneline \\\n\t-I twoline' "-I oneline -I twoline" |