summaryrefslogtreecommitdiff
path: root/eclass/tests/autotools_eaclocal_amflags.sh
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /eclass/tests/autotools_eaclocal_amflags.sh
reinit the tree, so we can have metadata
Diffstat (limited to 'eclass/tests/autotools_eaclocal_amflags.sh')
-rwxr-xr-xeclass/tests/autotools_eaclocal_amflags.sh31
1 files changed, 31 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..b39f5420c31c
--- /dev/null
+++ b/eclass/tests/autotools_eaclocal_amflags.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+source tests-common.sh
+
+inherit autotools
+
+test-it() {
+ tbegin "eaclocal_amflags $1: $2"
+ printf "ACLOCAL_AMFLAGS = %b\n" "$2" > Makefile.am
+ local flags=$(eaclocal_amflags) exp=${3:-$2}
+ [[ "${flags}" == "${exp}" ]]
+ if ! tend $? ; 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"
+
+texit