diff options
author | 2012-01-14 09:11:08 +0000 | |
---|---|---|
committer | 2012-01-14 09:11:08 +0000 | |
commit | e9b027716d225f2b54710e39785ce1e0267542fa (patch) | |
tree | 9af756c6dbd13b5387aa89bc4117a93936105079 /eclass/tests/flag-o-matic.sh | |
parent | unify duplicated lists of variable names and duplicated code blocks, and try ... (diff) | |
download | gentoo-2-e9b027716d225f2b54710e39785ce1e0267542fa.tar.gz gentoo-2-e9b027716d225f2b54710e39785ce1e0267542fa.tar.bz2 gentoo-2-e9b027716d225f2b54710e39785ce1e0267542fa.zip |
test more flag funcs
Diffstat (limited to 'eclass/tests/flag-o-matic.sh')
-rwxr-xr-x | eclass/tests/flag-o-matic.sh | 20 |
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 |