mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-08 08:20:28 +03:00
Fix matching substring flavour detection
com.github.jameshnsears.quoteunquote defines flavours 'fdroid' and 'fdroidS'. The old code used flavour in line, which matches both and the wrong one was selected. Closes: #912
This commit is contained in:
parent
a21c2c5ff1
commit
0fefecde1e
4 changed files with 248 additions and 1 deletions
|
|
@ -1235,6 +1235,19 @@ class CommonTest(unittest.TestCase):
|
|||
self.assertEqual(('1.0', '1', 'com.kunzisoft.fdroidtest.applicationidsuffix.underscore_first'),
|
||||
fdroidserver.common.parse_androidmanifests(paths, app))
|
||||
|
||||
app = fdroidserver.metadata.App()
|
||||
build = fdroidserver.metadata.Build()
|
||||
build.gradle = ['fdroid']
|
||||
app['Builds'] = [build]
|
||||
app.id = 'com.github.jameshnsears.quoteunquote'
|
||||
paths = [
|
||||
os.path.join('source-files', 'com.github.jameshnsears.quoteunquote', 'build.gradle'),
|
||||
]
|
||||
for path in paths:
|
||||
self.assertTrue(os.path.isfile(path))
|
||||
self.assertEqual(('2.5.2-fdroid', '73', 'com.github.jameshnsears.quoteunquote'),
|
||||
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(Path('source-files/cn.wildfirechat.chat'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue