mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
common: test abs and rel paths in get_all_gradle_and_manifests()
This commit is contained in:
parent
634864f206
commit
3d69e767d8
@ -1129,6 +1129,7 @@ class CommonTest(unittest.TestCase):
|
||||
fdroidserver.common.parse_androidmanifests(paths, app))
|
||||
|
||||
def test_get_all_gradle_and_manifests(self):
|
||||
"""Test whether the function works with relative and absolute paths"""
|
||||
a = fdroidserver.common.get_all_gradle_and_manifests(os.path.join('source-files', 'cn.wildfirechat.chat'))
|
||||
paths = [
|
||||
os.path.join('source-files', 'cn.wildfirechat.chat', 'avenginekit', 'build.gradle'),
|
||||
@ -1145,6 +1146,11 @@ class CommonTest(unittest.TestCase):
|
||||
]
|
||||
self.assertEqual(sorted(paths), sorted(a))
|
||||
|
||||
abspath = os.path.join(self.basedir, 'source-files', 'realm')
|
||||
p = fdroidserver.common.get_all_gradle_and_manifests(abspath)
|
||||
self.assertEqual(1, len(p))
|
||||
self.assertTrue(p[0].startswith(abspath))
|
||||
|
||||
def test_get_gradle_subdir(self):
|
||||
subdirs = {
|
||||
'cn.wildfirechat.chat': 'chat',
|
||||
|
Loading…
Reference in New Issue
Block a user