aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2021-03-07 02:29:49 -0700
committerTim Harder <radhermit@gmail.com>2021-03-07 02:29:49 -0700
commit1dca3e8a9edcd45411f2a1af028505399977dbb6 (patch)
treeeefa94ad4bdaa8b735ae3528af361e5585e99783 /tests
parenttests: fix mangled file skip test (diff)
downloadpkgdev-1dca3e8a9edcd45411f2a1af028505399977dbb6.tar.gz
pkgdev-1dca3e8a9edcd45411f2a1af028505399977dbb6.tar.bz2
pkgdev-1dca3e8a9edcd45411f2a1af028505399977dbb6.zip
tests: add repo root file change msg prefix tests
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts/test_pkgdev_commit.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/scripts/test_pkgdev_commit.py b/tests/scripts/test_pkgdev_commit.py
index dc0da80..c73da3d 100644
--- a/tests/scripts/test_pkgdev_commit.py
+++ b/tests/scripts/test_pkgdev_commit.py
@@ -218,6 +218,17 @@ class TestPkgdevCommit:
f.write('# comment\n')
assert commit().startswith('profiles/arch: ')
+ # single repo root file change
+ with open(pjoin(repo.location, 'skel.ebuild'), 'a+') as f:
+ f.write('# comment\n')
+ assert commit().startswith('skel.ebuild: ')
+
+ # multiple repo root file change (no commit message prefix)
+ for file in ('skel.ebuild', 'header.txt'):
+ with open(pjoin(repo.location, file), 'a+') as f:
+ f.write('# comment\n')
+ assert commit() == 'msg'
+
# treewide changes (no commit message prefix)
repo.create_ebuild('foo/bar-1')
with open(pjoin(repo.location, 'eclass', 'foo.eclass'), 'a+') as f: