summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-01-14 09:11:08 +0000
committerMike Frysinger <vapier@gentoo.org>2012-01-14 09:11:08 +0000
commit92085a625567c8bbc81a0e5365e6af09d5b4403f (patch)
tree1d5481c84e952fa6fe4dab8b2d9e8658e2f7980f /eclass
parentunify duplicated lists of variable names and duplicated code blocks, and try ... (diff)
downloadhistorical-92085a625567c8bbc81a0e5365e6af09d5b4403f.tar.gz
historical-92085a625567c8bbc81a0e5365e6af09d5b4403f.tar.bz2
historical-92085a625567c8bbc81a0e5365e6af09d5b4403f.zip
test more flag funcs
Diffstat (limited to 'eclass')
-rwxr-xr-xeclass/tests/flag-o-matic.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/eclass/tests/flag-o-matic.sh b/eclass/tests/flag-o-matic.sh
index 2991eee1e05f..f4f5952a4e58 100755
--- a/eclass/tests/flag-o-matic.sh
+++ b/eclass/tests/flag-o-matic.sh
@@ -27,7 +27,7 @@ while read exp flag ; do
[[ ${exp} -eq $? ]]
ftend
done <<<"
- 1 -l
+ 1 -L
0 -a
0 -x
"
@@ -77,4 +77,22 @@ done
)
ftend
+tbegin "strip-flags basic"
+CXXFLAGS+=" -O999 "
+strip-flags
+[[ -z ${CFLAGS}${LDFLAGS}${CPPFLAGS} && ${CXXFLAGS} == "-O2" ]]
+ftend
+
+tbegin "replace-flags basic"
+CFLAGS="-O0 -foo"
+replace-flags -O0 -O1
+[[ ${CFLAGS} == "-O1 -foo" ]]
+ftend
+
+tbegin "replace-flags glob"
+CXXFLAGS="-O0 -mcpu=bad -cow"
+replace-flags '-mcpu=*' -mcpu=good
+[[ ${CXXFLAGS} == "-O0 -mcpu=good -cow" ]]
+ftend
+
texit