diff --git a/src/univers/conan/__init__.py b/src/univers/conan/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/univers/conan/errors.py b/src/univers/conan/errors.py new file mode 100644 index 00000000..bd965c13 --- /dev/null +++ b/src/univers/conan/errors.py @@ -0,0 +1,252 @@ +# +# Copyright (c) 2019 JFrog LTD +# SPDX-License-Identifier: MIT +# +# Visit https://aboutcode.org and https://github.com/nexB/univers for support and download. + +""" + Exceptions raised and handled in Conan + These exceptions are mapped between server (as an HTTP response) and client + through the REST API. When an error happens in server its translated to an HTTP + error code that its sent to client. Client reads the server code and raise the + matching exception. + + see return_plugin.py + +""" +from contextlib import contextmanager + + +@contextmanager +def conanfile_remove_attr(conanfile, names, method): + """remove some self.xxxx attribute from the class, so it raises an exception if used + within a given conanfile method + """ + original_class = type(conanfile) + + def _prop(attr_name): + def _m(_): + raise ConanException(f"'self.{attr_name}' access in '{method}()' method is forbidden") + + return property(_m) + + try: + new_class = type(original_class.__name__, (original_class,), {}) + conanfile.__class__ = new_class + for name in names: + setattr(new_class, name, _prop(name)) + yield + finally: + conanfile.__class__ = original_class + + +@contextmanager +def conanfile_exception_formatter(conanfile_name, func_name): + """ + Decorator to throw an exception formatted with the line of the conanfile where the error ocurrs. + """ + + def _raise_conanfile_exc(e): + m = _format_conanfile_exception(conanfile_name, func_name, e) + raise ConanExceptionInUserConanfileMethod(m) + + try: + yield + # TODO: Move ConanInvalidConfiguration from here? + except ConanInvalidConfiguration as exc: + msg = "{}: Invalid configuration: {}".format(str(conanfile_name), exc) + raise ConanInvalidConfiguration(msg) + except AttributeError as exc: + list_methods = [m for m in dir(list) if not m.startswith("__")] + if ( + "NoneType" in str(exc) + and func_name in ["layout", "package_info"] + and any(method in str(exc) for method in list_methods) + ): + raise ConanException( + "{}: {}. No default values are set for components. You are probably " + "trying to manipulate a component attribute in the '{}' method " + "without defining it previously".format(str(conanfile_name), exc, func_name) + ) + else: + _raise_conanfile_exc(exc) + except Exception as exc: + _raise_conanfile_exc(exc) + + +def _format_conanfile_exception(scope, method, exception): + """ + It will iterate the traceback lines, when it finds that the source code is inside the users + conanfile it "start recording" the messages, when the trace exits the conanfile we return + the traces. + """ + import sys + import traceback + + try: + conanfile_reached = False + tb = sys.exc_info()[2] + index = 0 + content_lines = [] + + while True: # If out of index will raise and will be captured later + # 40 levels of nested functions max, get the latest + filepath, line, name, contents = traceback.extract_tb(tb, 40)[index] + if "conanfile.py" not in filepath: # Avoid show trace from internal conan source code + if conanfile_reached: # The error goes to internal code, exit print + break + else: + if not conanfile_reached: # First line + msg = "%s: Error in %s() method" % (scope, method) + msg += ", line %d\n\t%s" % (line, contents) + else: + msg = ( + "while calling '%s', line %d\n\t%s" % (name, line, contents) + if line + else "\n\t%s" % contents + ) + content_lines.append(msg) + conanfile_reached = True + index += 1 + except Exception: + pass + ret = "\n".join(content_lines) + ret += "\n\t%s: %s" % (exception.__class__.__name__, str(exception)) + return ret + + +class ConanException(Exception): + """ + Generic conans exception + """ + + def __init__(self, *args, **kwargs): + self.info = None + self.remote = kwargs.pop("remote", None) + super(ConanException, self).__init__(*args, **kwargs) + + def remote_message(self): + if self.remote: + return " [Remote: {}]".format(self.remote.name) + return "" + + def __str__(self): + + msg = super(ConanException, self).__str__() + + try: + msg = str(msg) + except Exception: + msg = repr(msg) + + if self.remote: + return "{}.{}".format(msg, self.remote_message()) + + return msg + + +class ConanReferenceDoesNotExistInDB(ConanException): + """Reference does not exist in cache db""" + + pass + + +class ConanReferenceAlreadyExistsInDB(ConanException): + """Reference already exists in cache db""" + + pass + + +class NoRemoteAvailable(ConanException): + """No default remote configured or the specified remote do not exists""" + + pass + + +class InvalidNameException(ConanException): + pass + + +class ConanConnectionError(ConanException): + pass + + +class ConanOutdatedClient(ConanException): + pass + + +class ConanExceptionInUserConanfileMethod(ConanException): + pass + + +class ConanInvalidConfiguration(ConanExceptionInUserConanfileMethod): + """ + This binary, for the requested configuration and package-id cannot be built + """ + + pass + + +class ConanMigrationError(ConanException): + pass + + +# Remote exceptions # +class InternalErrorException(ConanException): + """ + Generic 500 error + """ + + pass + + +class RequestErrorException(ConanException): + """ + Generic 400 error + """ + + pass + + +class AuthenticationException(ConanException): # 401 + """ + 401 error + """ + + pass + + +class ForbiddenException(ConanException): # 403 + """ + 403 error + """ + + pass + + +class NotFoundException(ConanException): # 404 + """ + 404 error + """ + + def __init__(self, *args, **kwargs): + self.remote = kwargs.pop("remote", None) + super(NotFoundException, self).__init__(*args, **kwargs) + + +class UserInterfaceErrorException(RequestErrorException): + """ + 420 error + """ + + pass + + +EXCEPTION_CODE_MAPPING = { + InternalErrorException: 500, + RequestErrorException: 400, + AuthenticationException: 401, + ForbiddenException: 403, + NotFoundException: 404, + UserInterfaceErrorException: 420, +} diff --git a/src/univers/conan/errors.py.ABOUT b/src/univers/conan/errors.py.ABOUT new file mode 100644 index 00000000..2be4aeea --- /dev/null +++ b/src/univers/conan/errors.py.ABOUT @@ -0,0 +1,8 @@ +about_resource: errors.py +package_url: pkg:pypi/conan@2.0.0 +copyright: | + Copyright (c) 2019 JFrog LTD +download_url: https://github.com/conan-io/conan/blob/release/2.0/conans/errors.py +license_expression: MIT +homepage_url: https://github.com/conan-io/conan +notice_file: errors.py.NOTICE diff --git a/src/univers/conan/errors.py.NOTICE b/src/univers/conan/errors.py.NOTICE new file mode 100644 index 00000000..bc1fdcc8 --- /dev/null +++ b/src/univers/conan/errors.py.NOTICE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 JFrog LTD + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/univers/conan/version.py b/src/univers/conan/version.py new file mode 100644 index 00000000..9bd853b9 --- /dev/null +++ b/src/univers/conan/version.py @@ -0,0 +1,215 @@ +# +# Copyright (c) 2019 JFrog LTD +# SPDX-License-Identifier: MIT +# +# Visit https://aboutcode.org and https://github.com/nexB/univers for support and download. + +from functools import total_ordering + +from univers.conan.errors import ConanException + + +@total_ordering +class _VersionItem: + """a single "digit" in a version, like X.Y.Z all X and Y and Z are VersionItems + They can be int or strings + """ + + def __init__(self, item): + try: + self._v = int(item) + except ValueError: + self._v = item + + @property + def value(self): + return self._v + + def __str__(self): + return str(self._v) + + def __add__(self, other): + # necessary for the "bump()" functionality. Other aritmetic operations are missing + return self._v + other + + def __eq__(self, other): + if not isinstance(other, _VersionItem): + other = _VersionItem(other) + return self._v == other._v + + def __hash__(self): + return hash(self._v) + + def __lt__(self, other): + """ + @type other: _VersionItem + """ + if not isinstance(other, _VersionItem): + other = _VersionItem(other) + try: + return self._v < other._v + except TypeError: + return str(self._v) < str(other._v) + + +@total_ordering +class Version: + """ + This is NOT an implementation of semver, as users may use any pattern in their versions. + It is just a helper to parse "." or "-" and compare taking into account integers when possible + """ + + def __init__(self, value): + value = str(value) + self._value = value + + items = value.rsplit("+", 1) # split for build + if len(items) == 2: + value, build = items + self._build = Version(build) # This is a nested version by itself + else: + value = items[0] + self._build = None + + items = value.rsplit("-", 1) # split for pre-release + if len(items) == 2: + value, pre = items + self._pre = Version(pre) # This is a nested version by itself + else: + value = items[0] + self._pre = None + items = value.split(".") + items = [_VersionItem(item) for item in items] + self._items = tuple(items) + while items and items[-1].value == 0: + del items[-1] + self._nonzero_items = tuple(items) + + def bump(self, index): + """ + :meta private: + Bump the version + Increments by 1 the version field at the specified index, setting to 0 the fields + on the right. + 2.5 => bump(1) => 2.6 + 1.5.7 => bump(0) => 2.0.0 + + :param index: + """ + # this method is used to compute version ranges from tilde ~1.2 and caret ^1.2.1 ranges + # TODO: at this moment it only works for digits, cannot increment pre-release or builds + # better not make it public yet, keep it internal + items = list(self._items[:index]) + try: + items.append(self._items[index] + 1) + except TypeError: + raise ConanException(f"Cannot bump '{self._value} version index {index}, not an int") + items.extend([0] * (len(items) - index - 1)) + v = ".".join(str(i) for i in items) + # prerelease and build are dropped while bumping digits + result = Version(v) + return result + + def upper_bound(self, index): + items = list(self._items[:index]) + try: + items.append(self._items[index] + 1) + except TypeError: + raise ConanException(f"Cannot bump '{self._value} version index {index}, not an int") + items.extend([0] * (len(items) - index - 1)) + v = ".".join(str(i) for i in items) + v += "-" # Exclude prereleases + result = Version(v) + return result + + @property + def pre(self): + return self._pre + + @property + def build(self): + return self._build + + @property + def main(self): + return self._items + + @property + def major(self): + try: + return self.main[0] + except IndexError: + return None + + @property + def minor(self): + try: + return self.main[1] + except IndexError: + return None + + @property + def patch(self): + try: + return self.main[2] + except IndexError: + return None + + @property + def micro(self): + try: + return self.main[3] + except IndexError: + return None + + def __str__(self): + return self._value + + def __repr__(self): + return self._value + + def __eq__(self, other): + if other is None: + return False + if not isinstance(other, Version): + other = Version(other) + + return (self._nonzero_items, self._pre, self._build) == ( + other._nonzero_items, + other._pre, + other._build, + ) + + def __hash__(self): + return hash((self._nonzero_items, self._pre, self._build)) + + def __lt__(self, other): + if other is None: + return False + if not isinstance(other, Version): + other = Version(other) + + if self._pre: + if other._pre: # both are pre-releases + return (self._nonzero_items, self._pre, self._build) < ( + other._nonzero_items, + other._pre, + other._build, + ) + else: # Left hand is pre-release, right side is regular + if ( + self._nonzero_items == other._nonzero_items + ): # Problem only happens if both equal + return True + else: + return self._nonzero_items < other._nonzero_items + else: + if other._pre: # Left hand is regular, right side is pre-release + if ( + self._nonzero_items == other._nonzero_items + ): # Problem only happens if both equal + return False + else: + return self._nonzero_items < other._nonzero_items + else: # None of them is pre-release + return (self._nonzero_items, self._build) < (other._nonzero_items, other._build) diff --git a/src/univers/conan/version.py.ABOUT b/src/univers/conan/version.py.ABOUT new file mode 100644 index 00000000..140eeef2 --- /dev/null +++ b/src/univers/conan/version.py.ABOUT @@ -0,0 +1,8 @@ +about_resource: version.py +package_url: pkg:pypi/conan@2.0.0 +copyright: | + Copyright (c) 2019 JFrog LTD +download_url: https://github.com/conan-io/conan/blob/release/2.0/conans/model/version.py +license_expression: MIT +homepage_url: https://github.com/conan-io/conan +notice_file: version.py.NOTICE diff --git a/src/univers/conan/version.py.NOTICE b/src/univers/conan/version.py.NOTICE new file mode 100644 index 00000000..bc1fdcc8 --- /dev/null +++ b/src/univers/conan/version.py.NOTICE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 JFrog LTD + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/univers/conan/version_range.py b/src/univers/conan/version_range.py new file mode 100644 index 00000000..7add0a8c --- /dev/null +++ b/src/univers/conan/version_range.py @@ -0,0 +1,108 @@ +# +# Copyright (c) 2019 JFrog LTD +# SPDX-License-Identifier: MIT +# +# Visit https://aboutcode.org and https://github.com/nexB/univers for support and download. + +from collections import namedtuple + +from univers.conan.errors import ConanException +from univers.versions import ConanVersion + +_Condition = namedtuple("_Condition", ["operator", "version"]) + + +class _ConditionSet: + def __init__(self, expression, prerelease): + expressions = expression.split() + self.prerelease = prerelease + self.conditions = [] + for e in expressions: + e = e.strip() + if e[-1] == "-": # Include pre-releases + e = e[:-1] + self.prerelease = True + self.conditions.extend(self._parse_expression(e)) + + @staticmethod + def _parse_expression(expression): + if expression == "" or expression == "*": + return [_Condition(">=", ConanVersion("0.0.0"))] + + operator = expression[0] + if operator not in (">", "<", "^", "~", "="): + operator = "=" + index = 0 + else: + index = 1 + if operator in (">", "<"): + if expression[1] == "=": + operator += "=" + index = 2 + version = expression[index:] + if version == "": + raise ConanException(f"Error parsing version range {expression}") + if operator == "~": # tilde minor + v = ConanVersion(version) + index = 1 if len(v.main) > 1 else 0 + return [_Condition(">=", v), _Condition("<", v.upper_bound(index))] + elif operator == "^": # caret major + v = ConanVersion(version) + + def first_non_zero(main): + for i, m in enumerate(main): + if m != 0: + return i + return len(main) + + initial_index = first_non_zero(v.main) + return [_Condition(">=", v), _Condition("<", v.upper_bound(initial_index))] + else: + return [_Condition(operator, ConanVersion(version))] + + def valid(self, version): + if version.pre: + if not self.prerelease: + return False + for condition in self.conditions: + if condition.operator == ">": + if not version > condition.version: + return False + elif condition.operator == "<": + if not version < condition.version: + return False + elif condition.operator == ">=": + if not version >= condition.version: + return False + elif condition.operator == "<=": + if not version <= condition.version: + return False + elif condition.operator == "=": + if not version == condition.version: + return False + return True + + +class VersionRange: + def __init__(self, expression): + self._expression = expression + tokens = expression.split(",") + prereleases = None + for t in tokens[1:]: + if "include_prerelease" in t: + prereleases = True + break + version_expr = tokens[0] + self.condition_sets = [] + for alternative in version_expr.split("||"): + self.condition_sets.append(_ConditionSet(alternative, prereleases)) + + def __str__(self): + return self._expression + + def __contains__(self, version): + assert isinstance(version, ConanVersion), type(version) + for condition_set in self.condition_sets: + if condition_set.valid(version): + return True + return False diff --git a/src/univers/conan/version_range.py.ABOUT b/src/univers/conan/version_range.py.ABOUT new file mode 100644 index 00000000..db151f67 --- /dev/null +++ b/src/univers/conan/version_range.py.ABOUT @@ -0,0 +1,8 @@ +about_resource: version_range.py +package_url: pkg:pypi/conan@2.0.0 +copyright: | + Copyright (c) 2019 JFrog LTD +download_url: https://github.com/conan-io/conan/blob/release/2.0/conans/model/version_range.py +license_expression: MIT +homepage_url: https://github.com/conan-io/conan +notice_file: version_range.py.NOTICE diff --git a/src/univers/conan/version_range.py.NOTICE b/src/univers/conan/version_range.py.NOTICE new file mode 100644 index 00000000..bc1fdcc8 --- /dev/null +++ b/src/univers/conan/version_range.py.NOTICE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 JFrog LTD + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/univers/version_range.py b/src/univers/version_range.py index 3b4b053d..37138aae 100644 --- a/src/univers/version_range.py +++ b/src/univers/version_range.py @@ -14,6 +14,7 @@ from univers import gem from univers import maven from univers import versions +from univers.conan.version_range import VersionRange as conan_version_range from univers.utils import remove_spaces from univers.version_constraint import VersionConstraint from univers.version_constraint import contains_version @@ -377,6 +378,29 @@ def from_native(cls, string): return cls(constraints=constraints) +class ConanVersionRange(VersionRange): + scheme = "conan" + version_class = versions.ConanVersion + + @classmethod + def from_native(cls, string): + """ + Return a VersionRange built from a conan range ``string``. + """ + condition_sets = conan_version_range(string).condition_sets + constraints = [] + for conditions in condition_sets: + for condition in conditions.conditions: + comparator = condition.operator + version = condition.version + constraints.append( + VersionConstraint( + comparator=comparator, version=cls.version_class(str(version)) + ) + ) + return cls(constraints=constraints) + + class GemVersionRange(VersionRange): """ A version range implementation for Rubygems. @@ -1100,6 +1124,11 @@ class MattermostVersionRange(VersionRange): def from_gitlab_native(gitlab_scheme, string): purl_scheme = PURL_TYPE_BY_GITLAB_SCHEME[gitlab_scheme] vrc = RANGE_CLASS_BY_SCHEMES[purl_scheme] + supported_native_implementations = [ + ConanVersionRange, + ] + if vrc in supported_native_implementations: + return vrc.from_native(string) constraint_items = [] constraints = [] split = " " @@ -1223,6 +1252,7 @@ def build_range_from_github_advisory_constraint(scheme: str, string: str): "nginx": NginxVersionRange, "openssl": OpensslVersionRange, "mattermost": MattermostVersionRange, + "conan": ConanVersionRange, } PURL_TYPE_BY_GITLAB_SCHEME = { @@ -1233,4 +1263,5 @@ def build_range_from_github_advisory_constraint(scheme: str, string: str): "nuget": "nuget", "pypi": "pypi", "packagist": "composer", + "conan": "conan", } diff --git a/src/univers/versions.py b/src/univers/versions.py index 7f996657..b950af06 100644 --- a/src/univers/versions.py +++ b/src/univers/versions.py @@ -18,6 +18,7 @@ from univers import maven from univers import nuget from univers import rpm +from univers.conan.version import Version as conan_version from univers.utils import remove_spaces """ @@ -650,3 +651,127 @@ def __ge__(self, other): return self.value.__ge__(other.value) # version value are of diff type, then semver one is always ahead of legacy return isinstance(self.value, SemverVersion) + + +@attr.s(frozen=True, order=False, eq=False, hash=True) +@total_ordering +class ConanVersion(Version): + @classmethod + def build_value(cls, string): + return conan_version(string) + + @classmethod + def is_valid(cls, string): + try: + cls.build_value(string) + return True + except ValueError: + return False + + @property + def major(self): + return self.value and self.value.major + + @property + def minor(self): + return self.value and self.value.minor + + @property + def patch(self): + return self.value and self.value.patch + + @property + def prerelease(self): + return self.value and self.value.prerelease + + @property + def build(self): + return self.value and self.value.build + + @property + def micro(self): + return self.value and self.value.micro + + @property + def pre(self): + return self.value and self.value._pre + + @property + def nonzero_items(self): + return self.value and self.value._nonzero_items + + @property + def main(self): + return self.value._items + + @property + def major(self): + try: + return self.value.main[0] + except IndexError: + return None + + @property + def minor(self): + try: + return self.value.main[1] + except IndexError: + return None + + @property + def patch(self): + try: + return self.value.main[2] + except IndexError: + return None + + def upper_bound(self, index): + return self.value and self.value.upper_bound(index) + + def next_major(self): + return self.value and self.value.next_major() + + def next_minor(self): + return self.value and self.value.next_minor() + + def next_patch(self): + return self.value and self.value.next_patch() + + def bump(self, index): + return self.value and self.value.bump(index) + + def __eq__(self, other): + if other is None: + return False + if not isinstance(other, ConanVersion): + other = ConanVersion.build_value(other) + return self.value == other + return self.value == other.value + + def __lt__(self, other): + if other is None: + return False + if not isinstance(other, ConanVersion): + other = ConanVersion(str(other)) + return self.value < other.value + + def __le__(self, other): + if other is None: + return False + if not isinstance(other, ConanVersion): + other = ConanVersion(str(other)) + return self.value <= other.value + + def __gt__(self, other): + if other is None: + return False + if not isinstance(other, ConanVersion): + other = ConanVersion(str(other)) + return self.value > other.value + + def __ge__(self, other): + if other is None: + return False + if not isinstance(other, ConanVersion): + other = ConanVersion(str(other)) + return self.value >= other.value diff --git a/tests/data/conan_advisory.json b/tests/data/conan_advisory.json new file mode 100644 index 00000000..007954d7 --- /dev/null +++ b/tests/data/conan_advisory.json @@ -0,0 +1,2998 @@ +[ + { + "test_index": 1, + "scheme": "conan", + "native": ">=5.1.0 <=5.1.1", + "expected_vers": "vers:conan/>=5.1.0|<=5.1.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 2, + "scheme": "conan", + "native": "=5.2.5", + "expected_vers": "vers:conan/5.2.5", + "gitlab_scheme": "conan" + }, + { + "test_index": 3, + "scheme": "conan", + "native": "<3.5.4", + "expected_vers": "vers:conan/<3.5.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 4, + "scheme": "conan", + "native": "=3.7", + "expected_vers": "vers:conan/3.7", + "gitlab_scheme": "conan" + }, + { + "test_index": 5, + "scheme": "conan", + "native": "<0", + "expected_vers": "vers:conan/<0", + "gitlab_scheme": "conan" + }, + { + "test_index": 6, + "scheme": "conan", + "native": "<2.17.3", + "expected_vers": "vers:conan/<2.17.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 7, + "scheme": "conan", + "native": "<=2.18.1", + "expected_vers": "vers:conan/<=2.18.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 8, + "scheme": "conan", + "native": ">=1.11.34 <2.19.3", + "expected_vers": "vers:conan/>=1.11.34|<2.19.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 9, + "scheme": "conan", + "native": "<1.0.8", + "expected_vers": "vers:conan/<1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 10, + "scheme": "conan", + "native": "=1.16.0", + "expected_vers": "vers:conan/1.16.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 11, + "scheme": "conan", + "native": "<1.16.0", + "expected_vers": "vers:conan/<1.16.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 12, + "scheme": "conan", + "native": ">=1.0.0 <1.17.2", + "expected_vers": "vers:conan/>=1.0.0|<1.17.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 13, + "scheme": "conan", + "native": "<1.17.4", + "expected_vers": "vers:conan/<1.17.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 14, + "scheme": "conan", + "native": "<0.13.7||>=0.14.0 <0.14.11||>=0.15.0 <0.15.2", + "expected_vers": "vers:conan/<0.13.7|>=0.14.0|<0.14.11|>=0.15.0|<0.15.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 15, + "scheme": "conan", + "native": "<=1.3.0", + "expected_vers": "vers:conan/<=1.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 16, + "scheme": "conan", + "native": "<=1.3.0", + "expected_vers": "vers:conan/<=1.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 17, + "scheme": "conan", + "native": "<2.9.3", + "expected_vers": "vers:conan/<2.9.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 18, + "scheme": "conan", + "native": "<3.1.0", + "expected_vers": "vers:conan/<3.1.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 19, + "scheme": "conan", + "native": "<=0.5.8", + "expected_vers": "vers:conan/<=0.5.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 20, + "scheme": "conan", + "native": "<=0.1.12", + "expected_vers": "vers:conan/<=0.1.12", + "gitlab_scheme": "conan" + }, + { + "test_index": 21, + "scheme": "conan", + "native": "<=0.1.12", + "expected_vers": "vers:conan/<=0.1.12", + "gitlab_scheme": "conan" + }, + { + "test_index": 22, + "scheme": "conan", + "native": "<=2.1.27", + "expected_vers": "vers:conan/<=2.1.27", + "gitlab_scheme": "conan" + }, + { + "test_index": 23, + "scheme": "conan", + "native": ">=2.1.17 <=2.1.27", + "expected_vers": "vers:conan/>=2.1.17|<=2.1.27", + "gitlab_scheme": "conan" + }, + { + "test_index": 24, + "scheme": "conan", + "native": "<=3.6.6", + "expected_vers": "vers:conan/<=3.6.6", + "gitlab_scheme": "conan" + }, + { + "test_index": 25, + "scheme": "conan", + "native": "<=3.6.6", + "expected_vers": "vers:conan/<=3.6.6", + "gitlab_scheme": "conan" + }, + { + "test_index": 26, + "scheme": "conan", + "native": "<=3.6.6", + "expected_vers": "vers:conan/<=3.6.6", + "gitlab_scheme": "conan" + }, + { + "test_index": 27, + "scheme": "conan", + "native": "<=3.6.6", + "expected_vers": "vers:conan/<=3.6.6", + "gitlab_scheme": "conan" + }, + { + "test_index": 28, + "scheme": "conan", + "native": "<3.6.7", + "expected_vers": "vers:conan/<3.6.7", + "gitlab_scheme": "conan" + }, + { + "test_index": 29, + "scheme": "conan", + "native": "<3.6.7", + "expected_vers": "vers:conan/<3.6.7", + "gitlab_scheme": "conan" + }, + { + "test_index": 30, + "scheme": "conan", + "native": "<3.6.7", + "expected_vers": "vers:conan/<3.6.7", + "gitlab_scheme": "conan" + }, + { + "test_index": 31, + "scheme": "conan", + "native": "=3.6.7", + "expected_vers": "vers:conan/3.6.7", + "gitlab_scheme": "conan" + }, + { + "test_index": 32, + "scheme": "conan", + "native": "<2021.07.22.00", + "expected_vers": "vers:conan/<2021.07.22.00", + "gitlab_scheme": "conan" + }, + { + "test_index": 33, + "scheme": "conan", + "native": "<1.0.12", + "expected_vers": "vers:conan/<1.0.12", + "gitlab_scheme": "conan" + }, + { + "test_index": 34, + "scheme": "conan", + "native": "<1.0.12", + "expected_vers": "vers:conan/<1.0.12", + "gitlab_scheme": "conan" + }, + { + "test_index": 35, + "scheme": "conan", + "native": "<1.0.12", + "expected_vers": "vers:conan/<1.0.12", + "gitlab_scheme": "conan" + }, + { + "test_index": 36, + "scheme": "conan", + "native": ">=3.3.0 <=3.4.0", + "expected_vers": "vers:conan/>=3.3.0|<=3.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 37, + "scheme": "conan", + "native": "=2.42.6", + "expected_vers": "vers:conan/2.42.6", + "gitlab_scheme": "conan" + }, + { + "test_index": 38, + "scheme": "conan", + "native": "<=5.1.4", + "expected_vers": "vers:conan/<=5.1.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 39, + "scheme": "conan", + "native": "=5.1.4", + "expected_vers": "vers:conan/5.1.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 40, + "scheme": "conan", + "native": "=5.2.1", + "expected_vers": "vers:conan/5.2.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 41, + "scheme": "conan", + "native": "<2.65.3", + "expected_vers": "vers:conan/<2.65.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 42, + "scheme": "conan", + "native": ">=2.60.0 <=2.62.4", + "expected_vers": "vers:conan/>=2.60.0|<=2.62.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 43, + "scheme": "conan", + "native": "<2.66.7||>=2.67.0 <2.67.4", + "expected_vers": "vers:conan/<2.66.7|>=2.67.0|<2.67.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 44, + "scheme": "conan", + "native": "<2.66.6||>=2.67.0 <2.67.3", + "expected_vers": "vers:conan/<2.66.6|>=2.67.0|<2.67.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 45, + "scheme": "conan", + "native": "<2.66.8", + "expected_vers": "vers:conan/<2.66.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 46, + "scheme": "conan", + "native": "<2.63.6", + "expected_vers": "vers:conan/<2.63.6", + "gitlab_scheme": "conan" + }, + { + "test_index": 47, + "scheme": "conan", + "native": "<=3.2", + "expected_vers": "vers:conan/<=3.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 48, + "scheme": "conan", + "native": "<=3.2", + "expected_vers": "vers:conan/<=3.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 49, + "scheme": "conan", + "native": "=2.8.107", + "expected_vers": "vers:conan/2.8.107", + "gitlab_scheme": "conan" + }, + { + "test_index": 50, + "scheme": "conan", + "native": "=2.8.107", + "expected_vers": "vers:conan/2.8.107", + "gitlab_scheme": "conan" + }, + { + "test_index": 51, + "scheme": "conan", + "native": "=2.8.107", + "expected_vers": "vers:conan/2.8.107", + "gitlab_scheme": "conan" + }, + { + "test_index": 52, + "scheme": "conan", + "native": "=2.8.107", + "expected_vers": "vers:conan/2.8.107", + "gitlab_scheme": "conan" + }, + { + "test_index": 53, + "scheme": "conan", + "native": "=2.8.107", + "expected_vers": "vers:conan/2.8.107", + "gitlab_scheme": "conan" + }, + { + "test_index": 54, + "scheme": "conan", + "native": "=2.8.107", + "expected_vers": "vers:conan/2.8.107", + "gitlab_scheme": "conan" + }, + { + "test_index": 55, + "scheme": "conan", + "native": "=2.9.0", + "expected_vers": "vers:conan/2.9.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 56, + "scheme": "conan", + "native": "=4.3.0", + "expected_vers": "vers:conan/4.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 57, + "scheme": "conan", + "native": "<=1.12.0", + "expected_vers": "vers:conan/<=1.12.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 58, + "scheme": "conan", + "native": "<=1.12.0", + "expected_vers": "vers:conan/<=1.12.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 59, + "scheme": "conan", + "native": "<=1.12.0", + "expected_vers": "vers:conan/<=1.12.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 60, + "scheme": "conan", + "native": "<=1.12.0", + "expected_vers": "vers:conan/<=1.12.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 61, + "scheme": "conan", + "native": "=1.13.1-1", + "expected_vers": "vers:conan/1.13.1-1", + "gitlab_scheme": "conan" + }, + { + "test_index": 62, + "scheme": "conan", + "native": "=1.13.1-1", + "expected_vers": "vers:conan/1.13.1-1", + "gitlab_scheme": "conan" + }, + { + "test_index": 63, + "scheme": "conan", + "native": "=1.13.1-1", + "expected_vers": "vers:conan/1.13.1-1", + "gitlab_scheme": "conan" + }, + { + "test_index": 64, + "scheme": "conan", + "native": "=1.13.1-1", + "expected_vers": "vers:conan/1.13.1-1", + "gitlab_scheme": "conan" + }, + { + "test_index": 65, + "scheme": "conan", + "native": "=1.13.1-1", + "expected_vers": "vers:conan/1.13.1-1", + "gitlab_scheme": "conan" + }, + { + "test_index": 66, + "scheme": "conan", + "native": "=1.13.1-1", + "expected_vers": "vers:conan/1.13.1-1", + "gitlab_scheme": "conan" + }, + { + "test_index": 67, + "scheme": "conan", + "native": "=1.13.1-1", + "expected_vers": "vers:conan/1.13.1-1", + "gitlab_scheme": "conan" + }, + { + "test_index": 68, + "scheme": "conan", + "native": "=1.10.4", + "expected_vers": "vers:conan/1.10.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 69, + "scheme": "conan", + "native": "=1.10.4", + "expected_vers": "vers:conan/1.10.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 70, + "scheme": "conan", + "native": "=1.10.4", + "expected_vers": "vers:conan/1.10.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 71, + "scheme": "conan", + "native": "<=0.14.0", + "expected_vers": "vers:conan/<=0.14.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 72, + "scheme": "conan", + "native": "<=2.13.1", + "expected_vers": "vers:conan/<=2.13.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 73, + "scheme": "conan", + "native": "<2.0.23", + "expected_vers": "vers:conan/<2.0.23", + "gitlab_scheme": "conan" + }, + { + "test_index": 74, + "scheme": "conan", + "native": "<2.0.25", + "expected_vers": "vers:conan/<2.0.25", + "gitlab_scheme": "conan" + }, + { + "test_index": 75, + "scheme": "conan", + "native": "<2.0.25", + "expected_vers": "vers:conan/<2.0.25", + "gitlab_scheme": "conan" + }, + { + "test_index": 76, + "scheme": "conan", + "native": ">=2.0.0 <2.0.17", + "expected_vers": "vers:conan/>=2.0.0|<2.0.17", + "gitlab_scheme": "conan" + }, + { + "test_index": 77, + "scheme": "conan", + "native": "=2.0.24", + "expected_vers": "vers:conan/2.0.24", + "gitlab_scheme": "conan" + }, + { + "test_index": 78, + "scheme": "conan", + "native": "<2.0.27", + "expected_vers": "vers:conan/<2.0.27", + "gitlab_scheme": "conan" + }, + { + "test_index": 79, + "scheme": "conan", + "native": "<2.0.26", + "expected_vers": "vers:conan/<2.0.26", + "gitlab_scheme": "conan" + }, + { + "test_index": 80, + "scheme": "conan", + "native": "=3.0.6", + "expected_vers": "vers:conan/3.0.6", + "gitlab_scheme": "conan" + }, + { + "test_index": 81, + "scheme": "conan", + "native": "=3.0.6", + "expected_vers": "vers:conan/3.0.6", + "gitlab_scheme": "conan" + }, + { + "test_index": 82, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 83, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 84, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 85, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 86, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 87, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 88, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 89, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 90, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 91, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 92, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 93, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 94, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 95, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 96, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 97, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 98, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 99, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 100, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 101, + "scheme": "conan", + "native": "=2.2.0", + "expected_vers": "vers:conan/2.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 102, + "scheme": "conan", + "native": "<=2.3.0", + "expected_vers": "vers:conan/<=2.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 103, + "scheme": "conan", + "native": "<=2.3.0", + "expected_vers": "vers:conan/<=2.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 104, + "scheme": "conan", + "native": "=2.3.0", + "expected_vers": "vers:conan/2.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 105, + "scheme": "conan", + "native": "=2.4.0", + "expected_vers": "vers:conan/2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 106, + "scheme": "conan", + "native": "=2.4.0", + "expected_vers": "vers:conan/2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 107, + "scheme": "conan", + "native": "=2.4.0", + "expected_vers": "vers:conan/2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 108, + "scheme": "conan", + "native": "=2.4.0", + "expected_vers": "vers:conan/2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 109, + "scheme": "conan", + "native": "=2.4.0", + "expected_vers": "vers:conan/2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 110, + "scheme": "conan", + "native": "=2.4.0", + "expected_vers": "vers:conan/2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 111, + "scheme": "conan", + "native": "=2.4.0", + "expected_vers": "vers:conan/2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 112, + "scheme": "conan", + "native": "<=2.4.0", + "expected_vers": "vers:conan/<=2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 113, + "scheme": "conan", + "native": "<=2.4.0", + "expected_vers": "vers:conan/<=2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 114, + "scheme": "conan", + "native": "", + "expected_vers": "vers:conan/", + "gitlab_scheme": "conan" + }, + { + "test_index": 115, + "scheme": "conan", + "native": "<2021-10-15", + "expected_vers": "vers:conan/<2021-10-15", + "gitlab_scheme": "conan" + }, + { + "test_index": 116, + "scheme": "conan", + "native": "<=2.4.0", + "expected_vers": "vers:conan/<=2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 117, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 118, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 119, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 120, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 121, + "scheme": "conan", + "native": "=2.3.0", + "expected_vers": "vers:conan/2.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 122, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 123, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 124, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 125, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 126, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 127, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 128, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 129, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 130, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 131, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 132, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 133, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 134, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 135, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 136, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 137, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 138, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 139, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 140, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 141, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 142, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 143, + "scheme": "conan", + "native": "=3.0.0", + "expected_vers": "vers:conan/3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 144, + "scheme": "conan", + "native": "", + "expected_vers": "vers:conan/", + "gitlab_scheme": "conan" + }, + { + "test_index": 145, + "scheme": "conan", + "native": "=2.4.0", + "expected_vers": "vers:conan/2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 146, + "scheme": "conan", + "native": "<=0.14", + "expected_vers": "vers:conan/<=0.14", + "gitlab_scheme": "conan" + }, + { + "test_index": 147, + "scheme": "conan", + "native": "<1.80.0", + "expected_vers": "vers:conan/<1.80.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 148, + "scheme": "conan", + "native": "<1.80.0", + "expected_vers": "vers:conan/<1.80.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 149, + "scheme": "conan", + "native": "<1.80.0", + "expected_vers": "vers:conan/<1.80.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 150, + "scheme": "conan", + "native": "<1.80.0", + "expected_vers": "vers:conan/<1.80.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 151, + "scheme": "conan", + "native": "<1.80.0", + "expected_vers": "vers:conan/<1.80.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 152, + "scheme": "conan", + "native": "<1.80.0", + "expected_vers": "vers:conan/<1.80.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 153, + "scheme": "conan", + "native": "=3.4.1", + "expected_vers": "vers:conan/3.4.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 154, + "scheme": "conan", + "native": ">=3.4.0 <3.4.2", + "expected_vers": "vers:conan/>=3.4.0|<3.4.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 155, + "scheme": "conan", + "native": "<3.5.2", + "expected_vers": "vers:conan/<3.5.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 156, + "scheme": "conan", + "native": "<3.5.2", + "expected_vers": "vers:conan/<3.5.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 157, + "scheme": "conan", + "native": ">=3.4.1 <=3.5.2", + "expected_vers": "vers:conan/>=3.4.1|<=3.5.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 158, + "scheme": "conan", + "native": "=3.6.0", + "expected_vers": "vers:conan/3.6.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 159, + "scheme": "conan", + "native": "=3.6.0", + "expected_vers": "vers:conan/3.6.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 160, + "scheme": "conan", + "native": ">=3.0.0 <3.6.2", + "expected_vers": "vers:conan/>=3.0.0|<3.6.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 161, + "scheme": "conan", + "native": ">=0.6.0 <=0.6.1", + "expected_vers": "vers:conan/>=0.6.0|<=0.6.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 162, + "scheme": "conan", + "native": ">=0.6.0 <=0.6.1", + "expected_vers": "vers:conan/>=0.6.0|<=0.6.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 163, + "scheme": "conan", + "native": "=3.3", + "expected_vers": "vers:conan/3.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 164, + "scheme": "conan", + "native": ">=7.29.0 <=7.71.1", + "expected_vers": "vers:conan/>=7.29.0|<=7.71.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 165, + "scheme": "conan", + "native": ">=7.21.0 <7.74.0", + "expected_vers": "vers:conan/>=7.21.0|<7.74.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 166, + "scheme": "conan", + "native": ">=7.41.0 <7.74.0", + "expected_vers": "vers:conan/>=7.41.0|<7.74.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 167, + "scheme": "conan", + "native": ">=7.1.1 <=7.75.0", + "expected_vers": "vers:conan/>=7.1.1|<=7.75.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 168, + "scheme": "conan", + "native": ">=7.63.0 <=7.75.0", + "expected_vers": "vers:conan/>=7.63.0|<=7.75.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 169, + "scheme": "conan", + "native": ">=7.10.4 <7.77.0", + "expected_vers": "vers:conan/>=7.10.4|<7.77.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 170, + "scheme": "conan", + "native": ">=7.73.0 <=7.78.0", + "expected_vers": "vers:conan/>=7.73.0|<=7.78.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 171, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 172, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 173, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 174, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 175, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 176, + "scheme": "conan", + "native": "<=1.0.8", + "expected_vers": "vers:conan/<=1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 177, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 178, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 179, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 180, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 181, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 182, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 183, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 184, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 185, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 186, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 187, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 188, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 189, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 190, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 191, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 192, + "scheme": "conan", + "native": "=1.0.8", + "expected_vers": "vers:conan/1.0.8", + "gitlab_scheme": "conan" + }, + { + "test_index": 193, + "scheme": "conan", + "native": "=1.0.9", + "expected_vers": "vers:conan/1.0.9", + "gitlab_scheme": "conan" + }, + { + "test_index": 194, + "scheme": "conan", + "native": "=0.4.0", + "expected_vers": "vers:conan/0.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 195, + "scheme": "conan", + "native": "=0.4.0", + "expected_vers": "vers:conan/0.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 196, + "scheme": "conan", + "native": "=0.4.1", + "expected_vers": "vers:conan/0.4.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 197, + "scheme": "conan", + "native": "<0.28.4", + "expected_vers": "vers:conan/<0.28.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 198, + "scheme": "conan", + "native": "<0.28.4", + "expected_vers": "vers:conan/<0.28.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 199, + "scheme": "conan", + "native": "=2.0.4", + "expected_vers": "vers:conan/2.0.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 200, + "scheme": "conan", + "native": "<2.0.4", + "expected_vers": "vers:conan/<2.0.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 201, + "scheme": "conan", + "native": "=2.0.90", + "expected_vers": "vers:conan/2.0.90", + "gitlab_scheme": "conan" + }, + { + "test_index": 202, + "scheme": "conan", + "native": ">1.5.3 <=2.0.90", + "expected_vers": "vers:conan/>1.5.3|<=2.0.90", + "gitlab_scheme": "conan" + }, + { + "test_index": 203, + "scheme": "conan", + "native": "<9d", + "expected_vers": "vers:conan/<9d", + "gitlab_scheme": "conan" + }, + { + "test_index": 204, + "scheme": "conan", + "native": "<9d", + "expected_vers": "vers:conan/<9d", + "gitlab_scheme": "conan" + }, + { + "test_index": 205, + "scheme": "conan", + "native": "<1.64", + "expected_vers": "vers:conan/<1.64", + "gitlab_scheme": "conan" + }, + { + "test_index": 206, + "scheme": "conan", + "native": "<3.1.7", + "expected_vers": "vers:conan/<3.1.7", + "gitlab_scheme": "conan" + }, + { + "test_index": 207, + "scheme": "conan", + "native": "=1.6.0", + "expected_vers": "vers:conan/1.6.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 208, + "scheme": "conan", + "native": "<0.20", + "expected_vers": "vers:conan/<0.20", + "gitlab_scheme": "conan" + }, + { + "test_index": 209, + "scheme": "conan", + "native": "<=0.20", + "expected_vers": "vers:conan/<=0.20", + "gitlab_scheme": "conan" + }, + { + "test_index": 210, + "scheme": "conan", + "native": "<0.20.1", + "expected_vers": "vers:conan/<0.20.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 211, + "scheme": "conan", + "native": "<0.20.0", + "expected_vers": "vers:conan/<0.20.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 212, + "scheme": "conan", + "native": "=0.20.0", + "expected_vers": "vers:conan/0.20.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 213, + "scheme": "conan", + "native": "<=3.4.0", + "expected_vers": "vers:conan/<=3.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 214, + "scheme": "conan", + "native": "=1.0.30", + "expected_vers": "vers:conan/1.0.30", + "gitlab_scheme": "conan" + }, + { + "test_index": 215, + "scheme": "conan", + "native": "=1.1.10", + "expected_vers": "vers:conan/1.1.10", + "gitlab_scheme": "conan" + }, + { + "test_index": 216, + "scheme": "conan", + "native": "<4.2.0", + "expected_vers": "vers:conan/<4.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 217, + "scheme": "conan", + "native": "<4.2.0", + "expected_vers": "vers:conan/<4.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 218, + "scheme": "conan", + "native": "<4.2.0", + "expected_vers": "vers:conan/<4.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 219, + "scheme": "conan", + "native": "<4.2.0", + "expected_vers": "vers:conan/<4.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 220, + "scheme": "conan", + "native": ">=3.9.0 <=4.3.0", + "expected_vers": "vers:conan/>=3.9.0|<=4.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 221, + "scheme": "conan", + "native": ">=4.0.0 <=4.3.0", + "expected_vers": "vers:conan/>=4.0.0|<=4.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 222, + "scheme": "conan", + "native": "=4.3.0", + "expected_vers": "vers:conan/4.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 223, + "scheme": "conan", + "native": ">=3.9.0 <=4.3.0", + "expected_vers": "vers:conan/>=3.9.0|<=4.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 224, + "scheme": "conan", + "native": "=4.3.0", + "expected_vers": "vers:conan/4.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 225, + "scheme": "conan", + "native": "<=4.3.0", + "expected_vers": "vers:conan/<=4.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 226, + "scheme": "conan", + "native": "=4.3.0", + "expected_vers": "vers:conan/4.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 227, + "scheme": "conan", + "native": "=4.3.0", + "expected_vers": "vers:conan/4.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 228, + "scheme": "conan", + "native": "=4.3.0", + "expected_vers": "vers:conan/4.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 229, + "scheme": "conan", + "native": "=4.3.0", + "expected_vers": "vers:conan/4.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 230, + "scheme": "conan", + "native": "<4.4.0", + "expected_vers": "vers:conan/<4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 231, + "scheme": "conan", + "native": "<4.4.0", + "expected_vers": "vers:conan/<4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 232, + "scheme": "conan", + "native": "=4.3.0", + "expected_vers": "vers:conan/4.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 233, + "scheme": "conan", + "native": "=4.3.0", + "expected_vers": "vers:conan/4.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 234, + "scheme": "conan", + "native": "=4.4.0", + "expected_vers": "vers:conan/4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 235, + "scheme": "conan", + "native": "=4.4.0", + "expected_vers": "vers:conan/4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 236, + "scheme": "conan", + "native": "=4.4.0", + "expected_vers": "vers:conan/4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 237, + "scheme": "conan", + "native": "=4.3.0", + "expected_vers": "vers:conan/4.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 238, + "scheme": "conan", + "native": "=4.4.0", + "expected_vers": "vers:conan/4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 239, + "scheme": "conan", + "native": "=4.4.0", + "expected_vers": "vers:conan/4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 240, + "scheme": "conan", + "native": "=4.4.0", + "expected_vers": "vers:conan/4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 241, + "scheme": "conan", + "native": "<4.4.0", + "expected_vers": "vers:conan/<4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 242, + "scheme": "conan", + "native": "<4.4.0", + "expected_vers": "vers:conan/<4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 243, + "scheme": "conan", + "native": "<4.4.0", + "expected_vers": "vers:conan/<4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 244, + "scheme": "conan", + "native": "<=4.4.0", + "expected_vers": "vers:conan/<=4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 245, + "scheme": "conan", + "native": "=4.0.3-35", + "expected_vers": "vers:conan/4.0.3-35", + "gitlab_scheme": "conan" + }, + { + "test_index": 246, + "scheme": "conan", + "native": "=4.4.0", + "expected_vers": "vers:conan/4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 247, + "scheme": "conan", + "native": ">=3.9.0 <=4.4.0", + "expected_vers": "vers:conan/>=3.9.0|<=4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 248, + "scheme": "conan", + "native": "<=4.4.0", + "expected_vers": "vers:conan/<=4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 249, + "scheme": "conan", + "native": "<=4.4.0", + "expected_vers": "vers:conan/<=4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 250, + "scheme": "conan", + "native": "<=4.4.0", + "expected_vers": "vers:conan/<=4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 251, + "scheme": "conan", + "native": "<=4.4.0", + "expected_vers": "vers:conan/<=4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 252, + "scheme": "conan", + "native": "<=4.4.0", + "expected_vers": "vers:conan/<=4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 253, + "scheme": "conan", + "native": "<4.5.0", + "expected_vers": "vers:conan/<4.5.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 254, + "scheme": "conan", + "native": "<1.0.1", + "expected_vers": "vers:conan/<1.0.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 255, + "scheme": "conan", + "native": "<1.0.1", + "expected_vers": "vers:conan/<1.0.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 256, + "scheme": "conan", + "native": "<1.0.1", + "expected_vers": "vers:conan/<1.0.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 257, + "scheme": "conan", + "native": "<1.0.1", + "expected_vers": "vers:conan/<1.0.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 258, + "scheme": "conan", + "native": "<1.0.1", + "expected_vers": "vers:conan/<1.0.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 259, + "scheme": "conan", + "native": "=2.9.10", + "expected_vers": "vers:conan/2.9.10", + "gitlab_scheme": "conan" + }, + { + "test_index": 260, + "scheme": "conan", + "native": "=2.9.10", + "expected_vers": "vers:conan/2.9.10", + "gitlab_scheme": "conan" + }, + { + "test_index": 261, + "scheme": "conan", + "native": "<2.9.11", + "expected_vers": "vers:conan/<2.9.11", + "gitlab_scheme": "conan" + }, + { + "test_index": 262, + "scheme": "conan", + "native": "<2.9.11", + "expected_vers": "vers:conan/<2.9.11", + "gitlab_scheme": "conan" + }, + { + "test_index": 263, + "scheme": "conan", + "native": "<2.9.11", + "expected_vers": "vers:conan/<2.9.11", + "gitlab_scheme": "conan" + }, + { + "test_index": 264, + "scheme": "conan", + "native": "<2.9.11", + "expected_vers": "vers:conan/<2.9.11", + "gitlab_scheme": "conan" + }, + { + "test_index": 265, + "scheme": "conan", + "native": "<2.9.11", + "expected_vers": "vers:conan/<2.9.11", + "gitlab_scheme": "conan" + }, + { + "test_index": 266, + "scheme": "conan", + "native": "<2.9.13", + "expected_vers": "vers:conan/<2.9.13", + "gitlab_scheme": "conan" + }, + { + "test_index": 267, + "scheme": "conan", + "native": "<2.9.14", + "expected_vers": "vers:conan/<2.9.14", + "gitlab_scheme": "conan" + }, + { + "test_index": 268, + "scheme": "conan", + "native": "<2.10.3", + "expected_vers": "vers:conan/<2.10.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 269, + "scheme": "conan", + "native": "<2.10.3", + "expected_vers": "vers:conan/<2.10.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 270, + "scheme": "conan", + "native": "<1.1.35", + "expected_vers": "vers:conan/<1.1.35", + "gitlab_scheme": "conan" + }, + { + "test_index": 271, + "scheme": "conan", + "native": "<=0.11.4", + "expected_vers": "vers:conan/<=0.11.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 272, + "scheme": "conan", + "native": "<0.12.1", + "expected_vers": "vers:conan/<0.12.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 273, + "scheme": "conan", + "native": "<0.12.1", + "expected_vers": "vers:conan/<0.12.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 274, + "scheme": "conan", + "native": "<=0.12.1", + "expected_vers": "vers:conan/<=0.12.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 275, + "scheme": "conan", + "native": "<=0.12.1", + "expected_vers": "vers:conan/<=0.12.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 276, + "scheme": "conan", + "native": "<=0.12.1", + "expected_vers": "vers:conan/<=0.12.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 277, + "scheme": "conan", + "native": "=0.12.1", + "expected_vers": "vers:conan/0.12.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 278, + "scheme": "conan", + "native": "=0.12.1", + "expected_vers": "vers:conan/0.12.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 279, + "scheme": "conan", + "native": "=0.12.1", + "expected_vers": "vers:conan/0.12.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 280, + "scheme": "conan", + "native": "<=5.4.0", + "expected_vers": "vers:conan/<=5.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 281, + "scheme": "conan", + "native": "=5.4.0", + "expected_vers": "vers:conan/5.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 282, + "scheme": "conan", + "native": "<=5.4.0", + "expected_vers": "vers:conan/<=5.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 283, + "scheme": "conan", + "native": "=5.4.0", + "expected_vers": "vers:conan/5.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 284, + "scheme": "conan", + "native": "=5.4.0", + "expected_vers": "vers:conan/5.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 285, + "scheme": "conan", + "native": "=5.4.0", + "expected_vers": "vers:conan/5.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 286, + "scheme": "conan", + "native": "=5.4.0", + "expected_vers": "vers:conan/5.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 287, + "scheme": "conan", + "native": ">=5.1.0 <5.3.5||>=5.4.0 <5.4.4", + "expected_vers": "vers:conan/>=5.1.0|<5.3.5|>=5.4.0|<5.4.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 288, + "scheme": "conan", + "native": "=5.4.3", + "expected_vers": "vers:conan/5.4.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 289, + "scheme": "conan", + "native": ">=5.4.0 <=5.4.3", + "expected_vers": "vers:conan/>=5.4.0|<=5.4.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 290, + "scheme": "conan", + "native": ">=5.4.0 <=5.4.4", + "expected_vers": "vers:conan/>=5.4.0|<=5.4.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 291, + "scheme": "conan", + "native": ">=5.4.2 <=5.4.4", + "expected_vers": "vers:conan/>=5.4.2|<=5.4.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 292, + "scheme": "conan", + "native": "=1.8.3", + "expected_vers": "vers:conan/1.8.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 293, + "scheme": "conan", + "native": "<2.7.17||>=2.8.0 <2.16.8||>=2.17.0 <2.24.0", + "expected_vers": "vers:conan/<2.7.17|>=2.8.0|<2.16.8|>=2.17.0|<2.24.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 294, + "scheme": "conan", + "native": "=4.0.0", + "expected_vers": "vers:conan/4.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 295, + "scheme": "conan", + "native": "<=6.2.1", + "expected_vers": "vers:conan/<=6.2.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 296, + "scheme": "conan", + "native": "<6.3", + "expected_vers": "vers:conan/<6.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 297, + "scheme": "conan", + "native": "<3.7.2", + "expected_vers": "vers:conan/<3.7.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 298, + "scheme": "conan", + "native": "<3.7.3", + "expected_vers": "vers:conan/<3.7.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 299, + "scheme": "conan", + "native": "<2.4.1", + "expected_vers": "vers:conan/<2.4.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 300, + "scheme": "conan", + "native": "<2.4.1", + "expected_vers": "vers:conan/<2.4.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 301, + "scheme": "conan", + "native": "<2.4.1", + "expected_vers": "vers:conan/<2.4.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 302, + "scheme": "conan", + "native": "<2.4.1", + "expected_vers": "vers:conan/<2.4.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 303, + "scheme": "conan", + "native": "<2.4.1", + "expected_vers": "vers:conan/<2.4.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 304, + "scheme": "conan", + "native": "<2.4.1", + "expected_vers": "vers:conan/<2.4.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 305, + "scheme": "conan", + "native": "<2.4.1", + "expected_vers": "vers:conan/<2.4.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 306, + "scheme": "conan", + "native": "<2.4.1", + "expected_vers": "vers:conan/<2.4.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 307, + "scheme": "conan", + "native": "<2.5.2", + "expected_vers": "vers:conan/<2.5.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 308, + "scheme": "conan", + "native": "<2.5.2", + "expected_vers": "vers:conan/<2.5.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 309, + "scheme": "conan", + "native": "<2.5.2", + "expected_vers": "vers:conan/<2.5.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 310, + "scheme": "conan", + "native": "=2.3.0", + "expected_vers": "vers:conan/2.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 311, + "scheme": "conan", + "native": "=2.3.0", + "expected_vers": "vers:conan/2.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 312, + "scheme": "conan", + "native": "=2.3.0", + "expected_vers": "vers:conan/2.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 313, + "scheme": "conan", + "native": "<2.4.3||>=2.5.0 <2.5.4", + "expected_vers": "vers:conan/<2.4.3|>=2.5.0|<2.5.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 314, + "scheme": "conan", + "native": "<=2.5.7", + "expected_vers": "vers:conan/<=2.5.7", + "gitlab_scheme": "conan" + }, + { + "test_index": 315, + "scheme": "conan", + "native": "<2.5.4", + "expected_vers": "vers:conan/<2.5.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 316, + "scheme": "conan", + "native": "<2.5.4", + "expected_vers": "vers:conan/<2.5.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 317, + "scheme": "conan", + "native": "<2.5.4", + "expected_vers": "vers:conan/<2.5.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 318, + "scheme": "conan", + "native": "<2.5.4", + "expected_vers": "vers:conan/<2.5.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 319, + "scheme": "conan", + "native": "<=2.5.7", + "expected_vers": "vers:conan/<=2.5.7", + "gitlab_scheme": "conan" + }, + { + "test_index": 320, + "scheme": "conan", + "native": "<3.0.1", + "expected_vers": "vers:conan/<3.0.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 321, + "scheme": "conan", + "native": "<3.0.1", + "expected_vers": "vers:conan/<3.0.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 322, + "scheme": "conan", + "native": "<3.0.1", + "expected_vers": "vers:conan/<3.0.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 323, + "scheme": "conan", + "native": "<3.0.1", + "expected_vers": "vers:conan/<3.0.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 324, + "scheme": "conan", + "native": "<2.4.3||>=2.5.0 <2.5.4", + "expected_vers": "vers:conan/<2.4.3|>=2.5.0|<2.5.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 325, + "scheme": "conan", + "native": "<2.4.3||>=2.5.0 <2.5.4", + "expected_vers": "vers:conan/<2.4.3|>=2.5.0|<2.5.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 326, + "scheme": "conan", + "native": "<2.4.3||>=2.5.0 <2.5.4", + "expected_vers": "vers:conan/<2.4.3|>=2.5.0|<2.5.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 327, + "scheme": "conan", + "native": "<2.4.3||>=2.5.0 <2.5.4", + "expected_vers": "vers:conan/<2.4.3|>=2.5.0|<2.5.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 328, + "scheme": "conan", + "native": "<2.4.3||>=2.5.0 <2.5.4", + "expected_vers": "vers:conan/<2.4.3|>=2.5.0|<2.5.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 329, + "scheme": "conan", + "native": "<2.4.3||>=2.5.0 <2.5.4", + "expected_vers": "vers:conan/<2.4.3|>=2.5.0|<2.5.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 330, + "scheme": "conan", + "native": "<3.0.5", + "expected_vers": "vers:conan/<3.0.5", + "gitlab_scheme": "conan" + }, + { + "test_index": 331, + "scheme": "conan", + "native": "<3.0.5", + "expected_vers": "vers:conan/<3.0.5", + "gitlab_scheme": "conan" + }, + { + "test_index": 332, + "scheme": "conan", + "native": "<3.1.2", + "expected_vers": "vers:conan/<3.1.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 333, + "scheme": "conan", + "native": "=3.1.2", + "expected_vers": "vers:conan/3.1.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 334, + "scheme": "conan", + "native": ">=3.1.0 <3.1.4", + "expected_vers": "vers:conan/>=3.1.0|<3.1.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 335, + "scheme": "conan", + "native": "<=2.3.1", + "expected_vers": "vers:conan/<=2.3.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 336, + "scheme": "conan", + "native": "<=1.5.1||>=2.0.0 <2.4.0", + "expected_vers": "vers:conan/<=1.5.1|>=2.0.0|<2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 337, + "scheme": "conan", + "native": "<2.4.0", + "expected_vers": "vers:conan/<2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 338, + "scheme": "conan", + "native": "<2.4.0", + "expected_vers": "vers:conan/<2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 339, + "scheme": "conan", + "native": "<2.4.0", + "expected_vers": "vers:conan/<2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 340, + "scheme": "conan", + "native": "<2.4.0", + "expected_vers": "vers:conan/<2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 341, + "scheme": "conan", + "native": "<2.4.0", + "expected_vers": "vers:conan/<2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 342, + "scheme": "conan", + "native": "<2.4.0", + "expected_vers": "vers:conan/<2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 343, + "scheme": "conan", + "native": "<2.4.0", + "expected_vers": "vers:conan/<2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 344, + "scheme": "conan", + "native": "<=2.3.1", + "expected_vers": "vers:conan/<=2.3.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 345, + "scheme": "conan", + "native": "=2.3.1", + "expected_vers": "vers:conan/2.3.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 346, + "scheme": "conan", + "native": "=2.4.0", + "expected_vers": "vers:conan/2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 347, + "scheme": "conan", + "native": "<=2.4.0", + "expected_vers": "vers:conan/<=2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 348, + "scheme": "conan", + "native": "=2.4.0", + "expected_vers": "vers:conan/2.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 349, + "scheme": "conan", + "native": ">=1.1.1d <=1.1.1f", + "expected_vers": "vers:conan/>=1.1.1d|<=1.1.1f", + "gitlab_scheme": "conan" + }, + { + "test_index": 350, + "scheme": "conan", + "native": ">=1.0.2 <=1.0.2v", + "expected_vers": "vers:conan/<=1.0.2|>=1.0.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 351, + "scheme": "conan", + "native": ">=1.0.2 <=1.0.2w||>=1.1.1 <=1.1.1h", + "expected_vers": "vers:conan/>=1.0.2|<=1.0.2w|>=1.1.1|<=1.1.1h", + "gitlab_scheme": "conan" + }, + { + "test_index": 352, + "scheme": "conan", + "native": "=1.0.2s", + "expected_vers": "vers:conan/1.0.2s", + "gitlab_scheme": "conan" + }, + { + "test_index": 353, + "scheme": "conan", + "native": ">=1.0.2 <1.0.2y||>=1.1.1 <1.1.1j", + "expected_vers": "vers:conan/>=1.0.2|<1.0.2y|>=1.1.1|<1.1.1j", + "gitlab_scheme": "conan" + }, + { + "test_index": 354, + "scheme": "conan", + "native": ">=1.0.2 <1.0.2y||>=1.1.1 <1.1.1j", + "expected_vers": "vers:conan/>=1.0.2|<1.0.2y|>=1.1.1|<1.1.1j", + "gitlab_scheme": "conan" + }, + { + "test_index": 355, + "scheme": "conan", + "native": "<0", + "expected_vers": "vers:conan/<0", + "gitlab_scheme": "conan" + }, + { + "test_index": 356, + "scheme": "conan", + "native": ">=1.1.1 <1.1.1k", + "expected_vers": "vers:conan/>=1.1.1|<1.1.1k", + "gitlab_scheme": "conan" + }, + { + "test_index": 357, + "scheme": "conan", + "native": ">=1.1.1h <1.1.1k", + "expected_vers": "vers:conan/>=1.1.1h|<1.1.1k", + "gitlab_scheme": "conan" + }, + { + "test_index": 358, + "scheme": "conan", + "native": ">=1.1.1 <1.1.1l", + "expected_vers": "vers:conan/>=1.1.1|<1.1.1l", + "gitlab_scheme": "conan" + }, + { + "test_index": 359, + "scheme": "conan", + "native": ">=1.0.2 <1.0.2za||>=1.1.1 <1.1.1l", + "expected_vers": "vers:conan/>=1.0.2|<1.0.2za|>=1.1.1|<1.1.1l", + "gitlab_scheme": "conan" + }, + { + "test_index": 360, + "scheme": "conan", + "native": "<1.0.2||=1.1.0||=3.0.0", + "expected_vers": "vers:conan/<1.0.2|1.1.0|3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 361, + "scheme": "conan", + "native": ">=1.0.2 <1.1.1m||=3.0.0", + "expected_vers": "vers:conan/>=1.0.2|<1.1.1m|3.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 362, + "scheme": "conan", + "native": ">=1.0.2 <1.0.2zd||>=1.1.0 <1.1.1n||>=3.0.0 <3.0.2", + "expected_vers": "vers:conan/>=1.0.2|<1.0.2zd|>=1.1.0|<1.1.1n|>=3.0.0|<3.0.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 363, + "scheme": "conan", + "native": ">=1.0.2 <1.0.2ze||>=1.1.1 <1.1.1o||>=3.0.0 <3.0.3", + "expected_vers": "vers:conan/>=1.0.2|<1.0.2ze|>=1.1.1|<1.1.1o|>=3.0.0|<3.0.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 364, + "scheme": "conan", + "native": ">=3.0.0 <3.0.3", + "expected_vers": "vers:conan/>=3.0.0|<3.0.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 365, + "scheme": "conan", + "native": ">=3.0.0 <3.0.3", + "expected_vers": "vers:conan/>=3.0.0|<3.0.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 366, + "scheme": "conan", + "native": ">=3.0.0 <3.0.3", + "expected_vers": "vers:conan/>=3.0.0|<3.0.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 367, + "scheme": "conan", + "native": ">=1.0.2 <1.0.2zf||>=1.1.1 <1.1.1p||>=3.0.0 <3.0.4", + "expected_vers": "vers:conan/>=1.0.2|<1.0.2zf|>=1.1.1|<1.1.1p|>=3.0.0|<3.0.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 368, + "scheme": "conan", + "native": ">=1.1.1 <1.1.1q||>=3.0.0 <3.0.5", + "expected_vers": "vers:conan/>=1.1.1|<1.1.1q|>=3.0.0|<3.0.5", + "gitlab_scheme": "conan" + }, + { + "test_index": 369, + "scheme": "conan", + "native": "=3.0.4", + "expected_vers": "vers:conan/3.0.4", + "gitlab_scheme": "conan" + }, + { + "test_index": 370, + "scheme": "conan", + "native": ">=3.0.0 <3.0.6", + "expected_vers": "vers:conan/>=3.0.0|<3.0.6", + "gitlab_scheme": "conan" + }, + { + "test_index": 371, + "scheme": "conan", + "native": ">=3.0.0 <3.0.7", + "expected_vers": "vers:conan/>=3.0.0|<3.0.7", + "gitlab_scheme": "conan" + }, + { + "test_index": 372, + "scheme": "conan", + "native": ">=3.0.0 <3.0.7", + "expected_vers": "vers:conan/>=3.0.0|<3.0.7", + "gitlab_scheme": "conan" + }, + { + "test_index": 373, + "scheme": "conan", + "native": ">=3.0.0 <=3.0.7", + "expected_vers": "vers:conan/>=3.0.0|<=3.0.7", + "gitlab_scheme": "conan" + }, + { + "test_index": 374, + "scheme": "conan", + "native": "<8.44", + "expected_vers": "vers:conan/<8.44", + "gitlab_scheme": "conan" + }, + { + "test_index": 375, + "scheme": "conan", + "native": "<10.40", + "expected_vers": "vers:conan/<10.40", + "gitlab_scheme": "conan" + }, + { + "test_index": 376, + "scheme": "conan", + "native": "<10.40", + "expected_vers": "vers:conan/<10.40", + "gitlab_scheme": "conan" + }, + { + "test_index": 377, + "scheme": "conan", + "native": "<3.15.0", + "expected_vers": "vers:conan/<3.15.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 378, + "scheme": "conan", + "native": "<3.18.3||>=3.19.0 <3.19.5||>=3.20.0 <3.20.2||>=3.21.0 <3.21.6", + "expected_vers": "vers:conan/<3.18.3|>=3.19.0|<3.19.5|>=3.20.0|<3.20.2|>=3.21.0|<3.21.6", + "gitlab_scheme": "conan" + }, + { + "test_index": 379, + "scheme": "conan", + "native": "=1.3", + "expected_vers": "vers:conan/1.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 380, + "scheme": "conan", + "native": "=2.2", + "expected_vers": "vers:conan/2.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 381, + "scheme": "conan", + "native": "<=1.5.0", + "expected_vers": "vers:conan/<=1.5.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 382, + "scheme": "conan", + "native": ">=4.0 <4.4.1", + "expected_vers": "vers:conan/>=4.0|<4.4.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 383, + "scheme": "conan", + "native": ">=4.0 <4.4.3", + "expected_vers": "vers:conan/>=4.0|<4.4.3", + "gitlab_scheme": "conan" + }, + { + "test_index": 384, + "scheme": "conan", + "native": "<=2.0.1", + "expected_vers": "vers:conan/<=2.0.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 385, + "scheme": "conan", + "native": "=cci.20200203", + "expected_vers": "vers:conan/cci.20200203", + "gitlab_scheme": "conan" + }, + { + "test_index": 386, + "scheme": "conan", + "native": "=2.27", + "expected_vers": "vers:conan/2.27", + "gitlab_scheme": "conan" + }, + { + "test_index": 387, + "scheme": "conan", + "native": "=2.27", + "expected_vers": "vers:conan/2.27", + "gitlab_scheme": "conan" + }, + { + "test_index": 388, + "scheme": "conan", + "native": "=8.6.11", + "expected_vers": "vers:conan/8.6.11", + "gitlab_scheme": "conan" + }, + { + "test_index": 389, + "scheme": "conan", + "native": "=5.0.0", + "expected_vers": "vers:conan/5.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 390, + "scheme": "conan", + "native": ">=0.9.3 <=0.13.0", + "expected_vers": "vers:conan/>=0.9.3|<=0.13.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 391, + "scheme": "conan", + "native": "<2021.02.22.00", + "expected_vers": "vers:conan/<2021.02.22.00", + "gitlab_scheme": "conan" + }, + { + "test_index": 392, + "scheme": "conan", + "native": "<1.05.01", + "expected_vers": "vers:conan/<1.05.01", + "gitlab_scheme": "conan" + }, + { + "test_index": 393, + "scheme": "conan", + "native": "<0.9.6", + "expected_vers": "vers:conan/<0.9.6", + "gitlab_scheme": "conan" + }, + { + "test_index": 394, + "scheme": "conan", + "native": "<0.9.6", + "expected_vers": "vers:conan/<0.9.6", + "gitlab_scheme": "conan" + }, + { + "test_index": 395, + "scheme": "conan", + "native": ">=19.0.0 <=20.8.0", + "expected_vers": "vers:conan/>=19.0.0|<=20.8.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 396, + "scheme": "conan", + "native": ">=0.19.0 <0.30.0", + "expected_vers": "vers:conan/>=0.19.0|<0.30.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 397, + "scheme": "conan", + "native": ">=0.26.0 <0.30.0", + "expected_vers": "vers:conan/>=0.26.0|<0.30.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 398, + "scheme": "conan", + "native": "<0.30.0", + "expected_vers": "vers:conan/<0.30.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 399, + "scheme": "conan", + "native": "<0.33.1||>0.33.1 <0.34.1", + "expected_vers": "vers:conan/<0.33.1|>0.33.1|<0.34.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 400, + "scheme": "conan", + "native": ">=0.34.0 <0.34.2||>=0.35.0 <0.35.2", + "expected_vers": "vers:conan/>=0.34.0|<0.34.2|>=0.35.0|<0.35.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 401, + "scheme": "conan", + "native": "<0.38.1", + "expected_vers": "vers:conan/<0.38.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 402, + "scheme": "conan", + "native": ">=0.37.0 <0.38.2", + "expected_vers": "vers:conan/>=0.37.0|<0.38.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 403, + "scheme": "conan", + "native": "<0.38.1", + "expected_vers": "vers:conan/<0.38.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 404, + "scheme": "conan", + "native": "<1.0.2||>=2.0.0 <2.0.2", + "expected_vers": "vers:conan/<1.0.2|>=2.0.0|<2.0.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 405, + "scheme": "conan", + "native": "<1.0.2||>=2.0.0 <2.0.2", + "expected_vers": "vers:conan/<1.0.2|>=2.0.0|<2.0.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 406, + "scheme": "conan", + "native": "<1.0.2||>=2.0.0 <2.0.2", + "expected_vers": "vers:conan/<1.0.2|>=2.0.0|<2.0.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 407, + "scheme": "conan", + "native": "=4.3.0", + "expected_vers": "vers:conan/4.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 408, + "scheme": "conan", + "native": "<4.4.0", + "expected_vers": "vers:conan/<4.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 409, + "scheme": "conan", + "native": "<4.5.0", + "expected_vers": "vers:conan/<4.5.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 410, + "scheme": "conan", + "native": "<4.5.0", + "expected_vers": "vers:conan/<4.5.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 411, + "scheme": "conan", + "native": "<4.5.0", + "expected_vers": "vers:conan/<4.5.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 412, + "scheme": "conan", + "native": "<4.5.0", + "expected_vers": "vers:conan/<4.5.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 413, + "scheme": "conan", + "native": "<4.6.0", + "expected_vers": "vers:conan/<4.6.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 414, + "scheme": "conan", + "native": "<4.6.0", + "expected_vers": "vers:conan/<4.6.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 415, + "scheme": "conan", + "native": "<4.7.0", + "expected_vers": "vers:conan/<4.7.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 416, + "scheme": "conan", + "native": ">=4.6.0 <4.8.0", + "expected_vers": "vers:conan/>=4.6.0|<4.8.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 417, + "scheme": "conan", + "native": "<4.8.1", + "expected_vers": "vers:conan/<4.8.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 418, + "scheme": "conan", + "native": "<=5.0.0", + "expected_vers": "vers:conan/<=5.0.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 419, + "scheme": "conan", + "native": ">=5.0.0 <5.1.1", + "expected_vers": "vers:conan/>=5.0.0|<5.1.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 420, + "scheme": "conan", + "native": "<5.2.0", + "expected_vers": "vers:conan/<5.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 421, + "scheme": "conan", + "native": "<5.2.0", + "expected_vers": "vers:conan/<5.2.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 422, + "scheme": "conan", + "native": "<5.4.0", + "expected_vers": "vers:conan/<5.4.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 423, + "scheme": "conan", + "native": "<5.5.0", + "expected_vers": "vers:conan/<5.5.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 424, + "scheme": "conan", + "native": "=5.3.0", + "expected_vers": "vers:conan/5.3.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 425, + "scheme": "conan", + "native": "<5.5.1", + "expected_vers": "vers:conan/<5.5.1", + "gitlab_scheme": "conan" + }, + { + "test_index": 426, + "scheme": "conan", + "native": "<5.5.2", + "expected_vers": "vers:conan/<5.5.2", + "gitlab_scheme": "conan" + }, + { + "test_index": 427, + "scheme": "conan", + "native": "<5.5.0", + "expected_vers": "vers:conan/<5.5.0", + "gitlab_scheme": "conan" + }, + { + "test_index": 428, + "scheme": "conan", + "native": "<4.3.3", + "expected_vers": "vers:conan/<4.3.3", + "gitlab_scheme": "conan" + } +] \ No newline at end of file diff --git a/tests/test_conan_version_bump.py b/tests/test_conan_version_bump.py new file mode 100644 index 00000000..892cb1f5 --- /dev/null +++ b/tests/test_conan_version_bump.py @@ -0,0 +1,24 @@ +# +# Copyright (c) 2019 JFrog LTD +# SPDX-License-Identifier: MIT +# +# Visit https://aboutcode.org and https://github.com/nexB/univers for support and download. + +import pytest + +from univers.versions import ConanVersion + +values = [ + ["1.0.0", 0, "2.0.0"], + ["1.1.0", 0, "2.0.0"], + ["1.1.1-pre", 0, "2.0.0"], + ["1.1.1", 1, "1.2.0"], + ["1.1.1", 2, "1.1.2"], +] + + +@pytest.mark.parametrize("version, index, result", values) +def test_version_bump(version, index, result): + r = ConanVersion(version) + bumped = r.bump(index) + assert bumped == result diff --git a/tests/test_conan_version_bump.py.ABOUT b/tests/test_conan_version_bump.py.ABOUT new file mode 100644 index 00000000..183ffc57 --- /dev/null +++ b/tests/test_conan_version_bump.py.ABOUT @@ -0,0 +1,8 @@ +about_resource: test_conan_version_bump.py +package_url: pkg:pypi/conan@2.0.0 +copyright: | + Copyright (c) 2019 JFrog LTD +download_url: https://github.com/conan-io/conan/tree/release/2.0/conans/test/unittests/model/version/test_conan_version_bump.py +license_expression: MIT +homepage_url: https://github.com/conan-io/conan +notice_file: test_conan_version_bump.py.NOTICE diff --git a/tests/test_conan_version_bump.py.NOTICE b/tests/test_conan_version_bump.py.NOTICE new file mode 100644 index 00000000..bc1fdcc8 --- /dev/null +++ b/tests/test_conan_version_bump.py.NOTICE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 JFrog LTD + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/tests/test_conan_version_comparison.py b/tests/test_conan_version_comparison.py new file mode 100644 index 00000000..ccbe1eab --- /dev/null +++ b/tests/test_conan_version_comparison.py @@ -0,0 +1,119 @@ +# +# Copyright (c) 2019 JFrog LTD +# SPDX-License-Identifier: MIT +# +# Visit https://aboutcode.org and https://github.com/nexB/univers for support and download. + +import pytest + +from univers.versions import ConanVersion + +v = [ + ("1", "2"), + ("1.0", "1.1"), + ("1.0.2", "1.1.0"), + ("1.3", "1.22"), + ("1.1.3", "1.1.22"), + ("1.1.1.3", "1.1.1.22"), + ("1.1.1.1.3", "1.1.1.1.22"), + # Different lengths + ("1.0", "2"), + ("1.2", "1.3.1"), + ("1.0.2", "1.1"), + # Now with letters + ("1.1.a", "1.1.b"), + ("1.1.1.abc", "1.1.1.abz"), + ("a.b.c", "b.c"), + ("1.1", "1.a"), + ("1.1", "1.1a"), + ("1.1", "1.1.a"), + ("1.1.a", "1.2"), + # Arterisk are before digits + ("1.1*", "1.20"), + ("1.1.*", "1.20"), + ("1.2.2", "1.3.*"), + ("1.2.2", "1.2.3*"), + # build is easy + ("1.1+b1", "1.1+b2"), + ("1.1", "1.1+b2"), + ("1.1+b1", "1.2"), + ("1.1+b.3", "1.1+b.22"), + # pre-release is challenging + ("1.1-pre1", "1.1-pre2"), + ("1.1-alpha.3", "1.1-alpha.22"), + ("1.1-alpha.3+b1", "1.1-alpha.3+b2"), + ("1.1-alpha.1", "1.1"), + ("1.1", "1.2-alpha1"), + ("1.1-alpha.1", "1.1.0"), # pre to the generic 1.1 is earlier than 1.1.0 + ("1.0.0-", "1.0.0-alpha1"), +] + + +@pytest.mark.parametrize("v1, v2", v) +def test_comparison(v1, v2): + v1 = ConanVersion(v1) + v2 = ConanVersion(v2) + assert v1 < v2 + assert v2 > v1 + assert v1 != v2 + assert v1 <= v2 + assert v2 >= v1 + + +def test_comparison_with_integer(): + v1 = ConanVersion("13.0") + # Issue: https://github.com/conan-io/conan/issues/12907 + assert v1 > 5 + assert v1 >= 5 + assert v1 < 20 + assert v1 <= 20 + assert v1 == 13 + assert v1 != 14 + + +e = [ + ("1", "1.0"), + ("1", "1.0.0"), + ("1.0", "1.0.0"), + ("1.0", "1.0.0.0"), + ("1-pre1", "1.0-pre1"), + ("1-pre1", "1.0.0-pre1"), + ("1.0-pre1", "1.0.0-pre1"), + ("1.0-pre1.0", "1.0.0-pre1"), + ("1-pre1+b1", "1.0-pre1+b1"), + ("1-pre1+b1", "1.0.0-pre1+b1"), + ("1.0-pre1+b1", "1.0.0-pre1+b1"), + ("1+b1", "1.0+b1"), + ("1+b1", "1.0+b1.0"), + ("1+b1", "1.0.0+b1"), + ("1.0+b1", "1.0.0+b1"), +] + + +@pytest.mark.parametrize("v1, v2", e) +def test_equality(v1, v2): + v1 = ConanVersion(v1) + v2 = ConanVersion(v2) + assert v1 == v2 + assert not v1 != v2 + + +def test_elem_comparison(): + v1 = ConanVersion("1.2.3b.4-pre.1.2b+build.1.1b") + major = v1.major + assert major < 2 + assert major < "2" + assert major == 1 + assert major != 3 + assert major > 0 + assert str(major) == "1" + patch = v1.patch + assert patch < 4 + assert patch > 2 + assert patch < "3c" + assert patch > "3a" + assert patch == "3b" + micro = v1.micro + assert micro > 3 + assert micro < 5 + assert micro == 4 diff --git a/tests/test_conan_version_comparison.py.ABOUT b/tests/test_conan_version_comparison.py.ABOUT new file mode 100644 index 00000000..637da684 --- /dev/null +++ b/tests/test_conan_version_comparison.py.ABOUT @@ -0,0 +1,8 @@ +about_resource: test_conan_version_comparison.py +package_url: pkg:pypi/conan@2.0.0 +copyright: | + Copyright (c) 2019 JFrog LTD +download_url: https://github.com/conan-io/conan/tree/release/2.0/conans/test/unittests/model/version/test_conan_version_comparison.py +license_expression: MIT +homepage_url: https://github.com/conan-io/conan +notice_file: test_conan_version_comparison.py.NOTICE diff --git a/tests/test_conan_version_comparison.py.NOTICE b/tests/test_conan_version_comparison.py.NOTICE new file mode 100644 index 00000000..bc1fdcc8 --- /dev/null +++ b/tests/test_conan_version_comparison.py.NOTICE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 JFrog LTD + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/tests/test_conan_version_range.py b/tests/test_conan_version_range.py new file mode 100644 index 00000000..5c559228 --- /dev/null +++ b/tests/test_conan_version_range.py @@ -0,0 +1,73 @@ +# +# Copyright (c) 2019 JFrog LTD +# SPDX-License-Identifier: MIT +# +# Visit https://aboutcode.org and https://github.com/nexB/univers for support and download. + +import pytest + +from univers.conan.errors import ConanException +from univers.conan.version_range import VersionRange +from univers.versions import ConanVersion + +values = [ + [">1.0.0", [[[">", "1.0.0"]]], ["1.0.1"], ["0.1"]], + ["<2.0", [[["<", "2.0"]]], ["1.0.1"], ["2.1"]], + [">1 <2.0", [[[">", "1"], ["<", "2.0"]]], ["1.5.1"], ["0.1", "2.1"]], + # tilde + ["~2.5", [[[">=", "2.5"], ["<", "2.6-"]]], ["2.5.0", "2.5.3"], ["2.7", "2.6.1"]], + ["~2.5.1", [[[">=", "2.5.1"], ["<", "2.6.0-"]]], ["2.5.1", "2.5.3"], ["2.5", "2.6.1"]], + ["~1", [[[">=", "1"], ["<", "2-"]]], ["1.3", "1.8.1"], ["0.8", "2.2"]], + # caret + ["^1.2", [[[">=", "1.2"], ["<", "2.0-"]]], ["1.2.1", "1.51"], ["1", "2", "2.0.1"]], + ["^1.2.3", [[[">=", "1.2.3"], ["<", "2.0.0-"]]], ["1.2.3", "1.2.4"], ["2", "2.1", "2.0.1"]], + ["^0.1.2", [[[">=", "0.1.2"], ["<", "0.2.0-"]]], ["0.1.3", "0.1.44"], ["1", "0.3", "0.2.1"]], + # Identity + ["1.0.0", [[["=", "1.0.0"]]], ["1.0.0"], ["2", "1.0.1"]], + ["=1.0.0", [[["=", "1.0.0"]]], ["1.0.0"], ["2", "1.0.1"]], + # Any + ["*", [[[">=", "0.0.0"]]], ["1.0", "a.b"], []], + ["", [[[">=", "0.0.0"]]], ["1.0", "a.b"], []], + # Unions + ["1.0.0 || 2.1.3", [[["=", "1.0.0"]], [["=", "2.1.3"]]], ["1.0.0", "2.1.3"], ["2", "1.0.1"]], + [ + ">1 <2.0 || ^3.2 ", + [[[">", "1"], ["<", "2.0"]], [[">=", "3.2"], ["<", "4.0-"]]], + ["1.5", "3.3"], + ["2.1", "0.1", "5"], + ], + # pre-releases + ["", [[[">=", "0.0.0"]]], ["1.0"], ["1.0-pre.1"]], + ["*, include_prerelease=True", [[[">=", "0.0.0"]]], ["1.0", "1.0-pre.1"], []], + ["*-", [[[">=", "0.0.0"]]], ["1.0", "1.0-pre.1"], []], + [">1- <2.0", [[[">", "1"], ["<", "2.0"]]], ["1.5.1-pre1"], ["2.1-pre1"]], + [ + ">1- <2.0 || ^3.2 ", + [[[">", "1"], ["<", "2.0"]], [[">=", "3.2"], ["<", "4.0-"]]], + ["1.5-a1", "3.3"], + ["3.3-a1"], + ], + ["^1.1.2-", [[[">=", "1.1.2"], ["<", "2.0.0-"]]], ["1.2.3", "1.2.0-alpha1"], ["2.0.0-alpha1"]], + ["~1.1.2-", [[[">=", "1.1.2"], ["<", "1.2.0-"]]], ["1.1.3", "1.1.3-alpha1"], ["1.2.0-alpha1"]], +] + + +@pytest.mark.parametrize("version_range, conditions, versions_in, versions_out", values) +def test_range(version_range, conditions, versions_in, versions_out): + r = VersionRange(version_range) + for condition_set, expected_condition_set in zip(r.condition_sets, conditions): + for condition, expected_condition in zip(condition_set.conditions, expected_condition_set): + assert condition.operator == expected_condition[0] + assert condition.version == expected_condition[1] + + for v in versions_in: + assert ConanVersion(v) in r + + for v in versions_out: + assert ConanVersion(v) not in r + + +def test_wrong_range_syntax(): + # https://github.com/conan-io/conan/issues/12692 + with pytest.raises(ConanException): + VersionRange(">= 1.0") diff --git a/tests/test_conan_version_range.py.ABOUT b/tests/test_conan_version_range.py.ABOUT new file mode 100644 index 00000000..a6c406b4 --- /dev/null +++ b/tests/test_conan_version_range.py.ABOUT @@ -0,0 +1,8 @@ +about_resource: test_conan_version_range.py +package_url: pkg:pypi/conan@2.0.0 +copyright: | + Copyright (c) 2019 JFrog LTD +download_url: https://github.com/conan-io/conan/tree/release/2.0/conans/test/unittests/model/version/test_conan_version_range.py +license_expression: MIT +homepage_url: https://github.com/conan-io/conan +notice_file: test_conan_version_range.py.NOTICE diff --git a/tests/test_conan_version_range.py.NOTICE b/tests/test_conan_version_range.py.NOTICE new file mode 100644 index 00000000..bc1fdcc8 --- /dev/null +++ b/tests/test_conan_version_range.py.NOTICE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 JFrog LTD + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/tests/test_version_range.py b/tests/test_version_range.py index 70332838..5449acb9 100644 --- a/tests/test_version_range.py +++ b/tests/test_version_range.py @@ -11,6 +11,7 @@ from univers.version_constraint import VersionConstraint from univers.version_range import RANGE_CLASS_BY_SCHEMES +from univers.version_range import ConanVersionRange from univers.version_range import GemVersionRange from univers.version_range import InvalidVersionRange from univers.version_range import MattermostVersionRange @@ -20,6 +21,7 @@ from univers.version_range import PypiVersionRange from univers.version_range import VersionRange from univers.version_range import from_gitlab_native +from univers.versions import InvalidVersion from univers.versions import NugetVersion from univers.versions import OpensslVersion from univers.versions import PypiVersion @@ -353,6 +355,19 @@ def test_pypi_gitlab_version_range_parse(test_case): assert str(result) == test_case["expected_vers"] +@pytest.mark.parametrize("test_case", json.load(open("./tests/data/conan_advisory.json"))) +def test_conan_gitlab_version_range_parse(test_case): + if test_case["expected_vers"] is None: + with pytest.raises(InvalidVersion): + ConanVersionRange.from_native(string=test_case["native"]) + return + result = from_gitlab_native( + gitlab_scheme=test_case["gitlab_scheme"], + string=test_case["native"], + ) + assert str(result) == test_case["expected_vers"] + + @pytest.mark.parametrize("test_case", json.load(open("./tests/data/npm_gitlab.json"))) def test_npm_gitlab_version_range_parse(test_case): result = from_gitlab_native( @@ -397,6 +412,18 @@ def test_npm_advisory_version_range_parse(test_case): assert str(result) == test_case["expected_vers"] +@pytest.mark.parametrize("test_case", json.load(open("./tests/data/conan_advisory.json"))) +def test_conan_advisory_version_range_parse(test_case): + if test_case["expected_vers"] is None: + with pytest.raises(InvalidVersion): + ConanVersionRange.from_native(string=test_case["native"]) + return + result = ConanVersionRange.from_native( + string=test_case["native"], + ) + assert str(result) == test_case["expected_vers"] + + def test_invert(): vers_with_equal_operator = VersionRange.from_string("vers:gem/1.0") assert str(vers_with_equal_operator.invert()) == "vers:gem/!=1.0"