summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polyconseil.fr>2019-11-21 12:45:28 +0100
committerRaphaël Barrois <raphael.barrois@polyconseil.fr>2019-11-21 13:13:19 +0100
commitda55cf15dd71a0d9a839e7507e4fc69396c8326d (patch)
tree9fa88a3fab1f631ab82f5329f4ec0ad71fd01023 /tests
parent371faaf6453b07f5316e356e68d7f26ae44b0df9 (diff)
downloadsemantic-version-da55cf15dd71a0d9a839e7507e4fc69396c8326d.tar.gz
Fix NpmSpec prerelease-handling.
Thanks to Nathan Walters for spotting this. Npm ranges with a `<X.Y.Z-P` component were not properly expanded: they were converted to: <X.Y.0 || (>=X.Y.0 && <X.Y.Z-P && no-prerelease) The correct expansion is: <X.Y.0 || (>=X.Y.0-* && <X.Y.Z-P) Closes #86.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_npm.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_npm.py b/tests/test_npm.py
index 7bed337..da3f5ba 100644
--- a/tests/test_npm.py
+++ b/tests/test_npm.py
@@ -40,6 +40,10 @@ class NpmSpecTests(unittest.TestCase):
['1.2.3-alpha.3', '1.2.3-alpha.7', '3.4.5'],
['1.2.3-alpha.2', '3.4.5-alpha.9'],
),
+ '>1.2.3-alpha <1.2.3-beta': (
+ ['1.2.3-alpha.0', '1.2.3-alpha.1'],
+ ['1.2.3', '1.2.3-beta.0', '1.2.3-bravo'],
+ ),
'1.2.3 - 2.3.4': (
['1.2.3', '1.2.99', '2.2.0', '2.3.4', '2.3.4+b42'],
['1.2.0', '1.2.3-alpha.1', '2.3.5'],