aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2022-04-15 14:18:25 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2022-04-15 16:31:00 +0300
commit35f4212c2ae1aad52ad22f47442010ea6b07caf7 (patch)
tree1f1877d9b13ab9ecc2cbfe43ae88e5b974a23bcd /tests
parentpkgdev mask: test optional days arg for -r/--rites (diff)
downloadpkgdev-35f4212c2ae1aad52ad22f47442010ea6b07caf7.tar.gz
pkgdev-35f4212c2ae1aad52ad22f47442010ea6b07caf7.tar.bz2
pkgdev-35f4212c2ae1aad52ad22f47442010ea6b07caf7.zip
Improve pkgdev commit tests
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts/test_pkgdev_commit.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/scripts/test_pkgdev_commit.py b/tests/scripts/test_pkgdev_commit.py
index 6cb1ff0..ac3fc8b 100644
--- a/tests/scripts/test_pkgdev_commit.py
+++ b/tests/scripts/test_pkgdev_commit.py
@@ -476,6 +476,35 @@ class TestPkgdevCommit:
repo.create_ebuild('cat/pkg-6', eapi='7')
assert commit() == 'cat/pkg: update EAPI 6 -> 7'
+ # update description
+ repo.create_ebuild('cat/pkg-7')
+ git_repo.add_all('cat/pkg-7')
+ repo.create_ebuild('cat/pkg-7', description='something')
+ assert commit() == 'cat/pkg: update DESCRIPTION'
+
+ # update description & homepage
+ repo.create_ebuild('cat/pkg-7', description='another something', homepage='https://gentoo.org')
+ assert commit() == 'cat/pkg: update DESCRIPTION, HOMEPAGE'
+
+ # update string_targets (USE_RUBY)
+ repo.create_ebuild('cat/pkg-8', use_ruby='ruby27')
+ git_repo.add_all('cat/pkg-8')
+ repo.create_ebuild('cat/pkg-8', use_ruby='ruby27 ruby30')
+ assert commit() == 'cat/pkg: enable ruby30'
+ repo.create_ebuild('cat/pkg-8', use_ruby='ruby30')
+ assert commit() == 'cat/pkg: disable ruby27'
+ repo.create_ebuild('cat/pkg-8', use_ruby=' '.join(f'ruby{i}' for i in range(30, 40)))
+ assert commit() == 'cat/pkg: update USE_RUBY support'
+
+ # update array_targets (PYTHON_COMPAT)
+ repo.create_ebuild('cat/pkg-9', data='PYTHON_COMPAT=( python3_9 )')
+ git_repo.add_all('cat/pkg-9')
+ repo.create_ebuild('cat/pkg-9', data='PYTHON_COMPAT=( python3_{9..10} )')
+ assert commit() == 'cat/pkg: enable py3.10'
+ repo.create_ebuild('cat/pkg-9', data='PYTHON_COMPAT=( python3_10 )')
+ assert commit() == 'cat/pkg: disable py3.9'
+
+
# multiple ebuild modifications don't get a generated summary
repo.create_ebuild('cat/pkg-5', keywords=['~amd64'])
repo.create_ebuild('cat/pkg-6', keywords=['~amd64'])