diff options
author | Amadeusz Żołnowski <aidecoe@aidecoe.name> | 2016-05-26 20:59:11 +0100 |
---|---|---|
committer | Amadeusz Żołnowski <aidecoe@gentoo.org> | 2016-05-29 10:23:21 +0100 |
commit | 98ba2191992c67244e50da4e95d38fd426b817ee (patch) | |
tree | 39defaaf95140f875eaf92a9929973a91483a591 /eclass/tests/rebar_remove_deps.sh | |
parent | rebar.eclass: Run unit tests (diff) | |
download | gentoo-98ba2191992c67244e50da4e95d38fd426b817ee.tar.gz gentoo-98ba2191992c67244e50da4e95d38fd426b817ee.tar.bz2 gentoo-98ba2191992c67244e50da4e95d38fd426b817ee.zip |
rebar.eclass: Optionally provide alternate rebar config to alter
Some packages have separate configs for build and tests. Build config is
always named 'rebar.config' and there seem to be no standard name for
tests config.
Diffstat (limited to 'eclass/tests/rebar_remove_deps.sh')
-rwxr-xr-x | eclass/tests/rebar_remove_deps.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/eclass/tests/rebar_remove_deps.sh b/eclass/tests/rebar_remove_deps.sh index 05207a783cb4..32351bff03cb 100755 --- a/eclass/tests/rebar_remove_deps.sh +++ b/eclass/tests/rebar_remove_deps.sh @@ -67,6 +67,25 @@ test_typical_config() { [[ ${unit_rc}${diff_rc} = 00 ]] } +test_typical_config_with_different_name() { + local diff_rc + local unit_rc + + # Prepare + cd "${S}" || die + cp typical.config other.config || die + + # Run unit + (rebar_remove_deps other.config) + unit_rc=$? + + # Test result + diff other.config rebar.config.expected + diff_rc=$? + + [[ ${unit_rc}${diff_rc} = 00 ]] +} + test_deps_in_one_line() { local diff_rc local unit_rc @@ -92,6 +111,10 @@ tbegin "rebar_remove_deps deals with typical config" test_typical_config tend $? +tbegin "rebar_remove_deps deals with typical config with different name" +test_typical_config_with_different_name +tend $? + tbegin "rebar_remove_deps deals with all deps in one line" test_deps_in_one_line tend $? |