from cargo2rpm.metadata import FeatureFlags
from cargo2rpm.rpm import buildrequires, workspace_buildrequires
from cargo2rpm.utils import load_metadata_from_resource, short_repr

import pytest


@pytest.mark.parametrize(
    "filename,flags,with_dev_deps,expected",
    [
        # default features with dev-dependencies
        (
            "ahash-0.8.3.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.31",
                "(crate(cfg-if/default) >= 1.0.0 with crate(cfg-if/default) < 2.0.0~)",
                "(crate(getrandom/default) >= 0.2.7 with crate(getrandom/default) < 0.3.0~)",
                "(crate(criterion/default) >= 0.3.2 with crate(criterion/default) < 0.4.0~)",
                "(crate(criterion/html_reports) >= 0.3.2 with crate(criterion/html_reports) < 0.4.0~)",
                "(crate(fnv/default) >= 1.0.5 with crate(fnv/default) < 2.0.0~)",
                "(crate(fxhash/default) >= 0.2.1 with crate(fxhash/default) < 0.3.0~)",
                "(crate(hashbrown/default) >= 0.12.3 with crate(hashbrown/default) < 0.13.0~)",
                "(crate(hex/default) >= 0.4.2 with crate(hex/default) < 0.5.0~)",
                "(crate(no-panic/default) >= 0.1.10 with crate(no-panic/default) < 0.2.0~)",
                "(crate(rand/default) >= 0.8.5 with crate(rand/default) < 0.9.0~)",
                "(crate(seahash/default) >= 4.0.0 with crate(seahash/default) < 5.0.0~)",
                "(crate(serde_json/default) >= 1.0.59 with crate(serde_json/default) < 2.0.0~)",
                "(crate(version_check/default) >= 0.9.4 with crate(version_check/default) < 0.10.0~)",
                "(crate(once_cell) >= 1.13.1 with crate(once_cell) < 2.0.0~)",
                "(crate(once_cell/unstable) >= 1.13.1 with crate(once_cell/unstable) < 2.0.0~)",
                "(crate(once_cell/alloc) >= 1.13.1 with crate(once_cell/alloc) < 2.0.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "ahash-0.8.3.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.31",
                "(crate(cfg-if/default) >= 1.0.0 with crate(cfg-if/default) < 2.0.0~)",
                "(crate(getrandom/default) >= 0.2.7 with crate(getrandom/default) < 0.3.0~)",
                "(crate(version_check/default) >= 0.9.4 with crate(version_check/default) < 0.10.0~)",
                "(crate(once_cell) >= 1.13.1 with crate(once_cell) < 2.0.0~)",
                "(crate(once_cell/unstable) >= 1.13.1 with crate(once_cell/unstable) < 2.0.0~)",
                "(crate(once_cell/alloc) >= 1.13.1 with crate(once_cell/alloc) < 2.0.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "aho-corasick-1.0.2.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.60.0",
                "(crate(doc-comment/default) >= 0.3.3 with crate(doc-comment/default) < 0.4.0~)",
                "(crate(memchr) >= 2.4.0 with crate(memchr) < 3.0.0~)",
                "(crate(memchr/std) >= 2.4.0 with crate(memchr/std) < 3.0.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "aho-corasick-1.0.2.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.60.0",
                "(crate(memchr) >= 2.4.0 with crate(memchr) < 3.0.0~)",
                "(crate(memchr/std) >= 2.4.0 with crate(memchr/std) < 3.0.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "assert_cmd-2.0.8.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.60.0",
                "(crate(bstr/default) >= 1.0.1 with crate(bstr/default) < 2.0.0~)",
                "(crate(doc-comment/default) >= 0.3.0 with crate(doc-comment/default) < 0.4.0~)",
                "(crate(predicates) >= 2.1.0 with crate(predicates) < 3.0.0~)",
                "(crate(predicates/diff) >= 2.1.0 with crate(predicates/diff) < 3.0.0~)",
                "(crate(predicates-core/default) >= 1.0.0 with crate(predicates-core/default) < 2.0.0~)",
                "(crate(predicates-tree/default) >= 1.0.0 with crate(predicates-tree/default) < 2.0.0~)",
                "(crate(wait-timeout/default) >= 0.2.0 with crate(wait-timeout/default) < 0.3.0~)",
                "(crate(escargot/default) >= 0.5.0 with crate(escargot/default) < 0.6.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "assert_cmd-2.0.8.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.60.0",
                "(crate(bstr/default) >= 1.0.1 with crate(bstr/default) < 2.0.0~)",
                "(crate(doc-comment/default) >= 0.3.0 with crate(doc-comment/default) < 0.4.0~)",
                "(crate(predicates) >= 2.1.0 with crate(predicates) < 3.0.0~)",
                "(crate(predicates/diff) >= 2.1.0 with crate(predicates/diff) < 3.0.0~)",
                "(crate(predicates-core/default) >= 1.0.0 with crate(predicates-core/default) < 2.0.0~)",
                "(crate(predicates-tree/default) >= 1.0.0 with crate(predicates-tree/default) < 2.0.0~)",
                "(crate(wait-timeout/default) >= 0.2.0 with crate(wait-timeout/default) < 0.3.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "assert_fs-1.0.10.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.60.0",
                "(crate(doc-comment/default) >= 0.3.0 with crate(doc-comment/default) < 0.4.0~)",
                "(crate(globwalk/default) >= 0.8.0 with crate(globwalk/default) < 0.9.0~)",
                "(crate(predicates) >= 2.0.3 with crate(predicates) < 3.0.0~)",
                "(crate(predicates/diff) >= 2.0.3 with crate(predicates/diff) < 3.0.0~)",
                "(crate(predicates-core/default) >= 1.0.0 with crate(predicates-core/default) < 2.0.0~)",
                "(crate(predicates-tree/default) >= 1.0.0 with crate(predicates-tree/default) < 2.0.0~)",
                "(crate(tempfile/default) >= 3.0.0 with crate(tempfile/default) < 4.0.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "assert_fs-1.0.10.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.60.0",
                "(crate(doc-comment/default) >= 0.3.0 with crate(doc-comment/default) < 0.4.0~)",
                "(crate(globwalk/default) >= 0.8.0 with crate(globwalk/default) < 0.9.0~)",
                "(crate(predicates) >= 2.0.3 with crate(predicates) < 3.0.0~)",
                "(crate(predicates/diff) >= 2.0.3 with crate(predicates/diff) < 3.0.0~)",
                "(crate(predicates-core/default) >= 1.0.0 with crate(predicates-core/default) < 2.0.0~)",
                "(crate(predicates-tree/default) >= 1.0.0 with crate(predicates-tree/default) < 2.0.0~)",
                "(crate(tempfile/default) >= 3.0.0 with crate(tempfile/default) < 4.0.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "autocfg-1.1.0.json",
            FeatureFlags(),
            True,
            set(),
        ),
        # default features without dev-dependencies
        (
            "autocfg-1.1.0.json",
            FeatureFlags(),
            False,
            set(),
        ),
        # default features with dev-dependencies
        (
            "bstr-1.2.0.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.60",
                "(crate(memchr) >= 2.4.0 with crate(memchr) < 3.0.0~)",
                "(crate(memchr/std) >= 2.4.0 with crate(memchr/std) < 3.0.0~)",
                "(crate(once_cell/default) >= 1.14.0 with crate(once_cell/default) < 2.0.0~)",
                "(crate(regex-automata) >= 0.1.5 with crate(regex-automata) < 0.2.0~)",
                "(crate(quickcheck) >= 1.0.0 with crate(quickcheck) < 2.0.0~)",
                "(crate(serde) >= 1.0.85 with crate(serde) < 2.0.0~)",
                "(crate(serde/alloc) >= 1.0.85 with crate(serde/alloc) < 2.0.0~)",
                "(crate(serde/std) >= 1.0.85 with crate(serde/std) < 2.0.0~)",
                "(crate(ucd-parse/default) >= 0.1.3 with crate(ucd-parse/default) < 0.2.0~)",
                "(crate(unicode-segmentation/default) >= 1.2.1 with crate(unicode-segmentation/default) < 2.0.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "bstr-1.2.0.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.60",
                "(crate(memchr) >= 2.4.0 with crate(memchr) < 3.0.0~)",
                "(crate(memchr/std) >= 2.4.0 with crate(memchr/std) < 3.0.0~)",
                "(crate(once_cell/default) >= 1.14.0 with crate(once_cell/default) < 2.0.0~)",
                "(crate(regex-automata) >= 0.1.5 with crate(regex-automata) < 0.2.0~)",
                "(crate(serde) >= 1.0.85 with crate(serde) < 2.0.0~)",
                "(crate(serde/alloc) >= 1.0.85 with crate(serde/alloc) < 2.0.0~)",
                "(crate(serde/std) >= 1.0.85 with crate(serde/std) < 2.0.0~)",
            },
        ),
        # default features with dev-dependencies
        ("cfg-if-1.0.0.json", FeatureFlags(), True, {"rust >= 1.31"}),
        # default features without dev-dependencies
        ("cfg-if-1.0.0.json", FeatureFlags(), False, {"rust >= 1.31"}),
        # default features with dev-dependencies
        (
            "clap-4.1.4.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.64.0",
                "(crate(bitflags/default) >= 1.2.0 with crate(bitflags/default) < 2.0.0~)",
                "(crate(clap_lex/default) >= 0.3.0 with crate(clap_lex/default) < 0.4.0~)",
                "(crate(is-terminal/default) >= 0.4.1 with crate(is-terminal/default) < 0.5.0~)",
                "(crate(strsim/default) >= 0.10.0 with crate(strsim/default) < 0.11.0~)",
                "(crate(termcolor/default) >= 1.1.1 with crate(termcolor/default) < 2.0.0~)",
                "(crate(humantime/default) >= 2.0.0 with crate(humantime/default) < 3.0.0~)",
                "(crate(rustversion/default) >= 1.0.0 with crate(rustversion/default) < 2.0.0~)",
                "(crate(shlex/default) >= 1.1.0 with crate(shlex/default) < 2.0.0~)",
                "(crate(snapbox/default) >= 0.4.0 with crate(snapbox/default) < 0.5.0~)",
                "(crate(static_assertions/default) >= 1.1.0 with crate(static_assertions/default) < 2.0.0~)",
                "(crate(trybuild/default) >= 1.0.73 with crate(trybuild/default) < 2.0.0~)",
                "(crate(trycmd) >= 0.14.9 with crate(trycmd) < 0.15.0~)",
                "(crate(trycmd/color-auto) >= 0.14.9 with crate(trycmd/color-auto) < 0.15.0~)",
                "(crate(trycmd/diff) >= 0.14.9 with crate(trycmd/diff) < 0.15.0~)",
                "(crate(trycmd/examples) >= 0.14.9 with crate(trycmd/examples) < 0.15.0~)",
                "(crate(unic-emoji-char/default) >= 0.9.0 with crate(unic-emoji-char/default) < 0.10.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "clap-4.1.4.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.64.0",
                "(crate(bitflags/default) >= 1.2.0 with crate(bitflags/default) < 2.0.0~)",
                "(crate(clap_lex/default) >= 0.3.0 with crate(clap_lex/default) < 0.4.0~)",
                "(crate(is-terminal/default) >= 0.4.1 with crate(is-terminal/default) < 0.5.0~)",
                "(crate(strsim/default) >= 0.10.0 with crate(strsim/default) < 0.11.0~)",
                "(crate(termcolor/default) >= 1.1.1 with crate(termcolor/default) < 2.0.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "gstreamer-0.19.7.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.63",
                "(crate(bitflags/default) >= 1.0.0 with crate(bitflags/default) < 2.0.0~)",
                "(crate(cfg-if/default) >= 1.0.0 with crate(cfg-if/default) < 2.0.0~)",
                "(crate(gstreamer-sys/default) >= 0.19.0 with crate(gstreamer-sys/default) < 0.20.0~)",
                "(crate(futures-channel/default) >= 0.3.0 with crate(futures-channel/default) < 0.4.0~)",
                "(crate(futures-core/default) >= 0.3.0 with crate(futures-core/default) < 0.4.0~)",
                "(crate(futures-util) >= 0.3.0 with crate(futures-util) < 0.4.0~)",
                "(crate(glib/default) >= 0.16.2 with crate(glib/default) < 0.17.0~)",
                "(crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0~)",
                "(crate(muldiv/default) >= 1.0.0 with crate(muldiv/default) < 2.0.0~)",
                "(crate(num-integer) >= 0.1.0 with crate(num-integer) < 0.2.0~)",
                "(crate(num-rational) >= 0.4.0 with crate(num-rational) < 0.5.0~)",
                "(crate(once_cell/default) >= 1.0.0 with crate(once_cell/default) < 2.0.0~)",
                "(crate(option-operations/default) >= 0.5.0 with crate(option-operations/default) < 0.6.0~)",
                "(crate(paste/default) >= 1.0.0 with crate(paste/default) < 2.0.0~)",
                "(crate(pretty-hex/default) >= 0.3.0 with crate(pretty-hex/default) < 0.4.0~)",
                "(crate(thiserror/default) >= 1.0.0 with crate(thiserror/default) < 2.0.0~)",
                "(crate(futures-executor/default) >= 0.3.1 with crate(futures-executor/default) < 0.4.0~)",
                "(crate(gir-format-check/default) >= 0.1.0 with crate(gir-format-check/default) < 0.2.0~)",
                "(crate(ron/default) >= 0.8.0 with crate(ron/default) < 0.9.0~)",
                "(crate(serde_json/default) >= 1.0.0 with crate(serde_json/default) < 2.0.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "gstreamer-0.19.7.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.63",
                "(crate(bitflags/default) >= 1.0.0 with crate(bitflags/default) < 2.0.0~)",
                "(crate(cfg-if/default) >= 1.0.0 with crate(cfg-if/default) < 2.0.0~)",
                "(crate(gstreamer-sys/default) >= 0.19.0 with crate(gstreamer-sys/default) < 0.20.0~)",
                "(crate(futures-channel/default) >= 0.3.0 with crate(futures-channel/default) < 0.4.0~)",
                "(crate(futures-core/default) >= 0.3.0 with crate(futures-core/default) < 0.4.0~)",
                "(crate(futures-util) >= 0.3.0 with crate(futures-util) < 0.4.0~)",
                "(crate(glib/default) >= 0.16.2 with crate(glib/default) < 0.17.0~)",
                "(crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0~)",
                "(crate(muldiv/default) >= 1.0.0 with crate(muldiv/default) < 2.0.0~)",
                "(crate(num-integer) >= 0.1.0 with crate(num-integer) < 0.2.0~)",
                "(crate(num-rational) >= 0.4.0 with crate(num-rational) < 0.5.0~)",
                "(crate(once_cell/default) >= 1.0.0 with crate(once_cell/default) < 2.0.0~)",
                "(crate(option-operations/default) >= 0.5.0 with crate(option-operations/default) < 0.6.0~)",
                "(crate(paste/default) >= 1.0.0 with crate(paste/default) < 2.0.0~)",
                "(crate(pretty-hex/default) >= 0.3.0 with crate(pretty-hex/default) < 0.4.0~)",
                "(crate(thiserror/default) >= 1.0.0 with crate(thiserror/default) < 2.0.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "human-panic-1.1.0.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.60.0",
                "(crate(backtrace/default) >= 0.3.9 with crate(backtrace/default) < 0.4.0~)",
                "crate(concolor/default) = 0.0.11",
                "crate(concolor/auto) = 0.0.11",
                "(crate(os_info/default) >= 2.0.6 with crate(os_info/default) < 3.0.0~)",
                "(crate(serde/default) >= 1.0.79 with crate(serde/default) < 2.0.0~)",
                "(crate(serde_derive/default) >= 1.0.79 with crate(serde_derive/default) < 2.0.0~)",
                "(crate(termcolor/default) >= 1.0.4 with crate(termcolor/default) < 2.0.0~)",
                "(crate(toml/default) >= 0.5.0 with crate(toml/default) < 0.6.0~)",
                "(crate(uuid) >= 0.8.0 with crate(uuid) < 0.9.0~)",
                "(crate(uuid/v4) >= 0.8.0 with crate(uuid/v4) < 0.9.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "human-panic-1.1.0.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.60.0",
                "(crate(backtrace/default) >= 0.3.9 with crate(backtrace/default) < 0.4.0~)",
                "crate(concolor/default) = 0.0.11",
                "crate(concolor/auto) = 0.0.11",
                "(crate(os_info/default) >= 2.0.6 with crate(os_info/default) < 3.0.0~)",
                "(crate(serde/default) >= 1.0.79 with crate(serde/default) < 2.0.0~)",
                "(crate(serde_derive/default) >= 1.0.79 with crate(serde_derive/default) < 2.0.0~)",
                "(crate(termcolor/default) >= 1.0.4 with crate(termcolor/default) < 2.0.0~)",
                "(crate(toml/default) >= 0.5.0 with crate(toml/default) < 0.6.0~)",
                "(crate(uuid) >= 0.8.0 with crate(uuid) < 0.9.0~)",
                "(crate(uuid/v4) >= 0.8.0 with crate(uuid/v4) < 0.9.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "iri-string-0.7.0.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.60",
                "(crate(memchr) >= 2.4.1 with crate(memchr) < 3.0.0~)",
                "(crate(memchr/std) >= 2.4.1 with crate(memchr/std) < 3.0.0~)",
                "(crate(serde) >= 1.0.103 with crate(serde) < 2.0.0~)",
                "(crate(serde/alloc) >= 1.0.103 with crate(serde/alloc) < 2.0.0~)",
                "(crate(serde/derive) >= 1.0.103 with crate(serde/derive) < 2.0.0~)",
                "(crate(serde/std) >= 1.0.103 with crate(serde/std) < 2.0.0~)",
                "(crate(serde_test/default) >= 1.0.104 with crate(serde_test/default) < 2.0.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "iri-string-0.7.0.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.60",
                "(crate(memchr) >= 2.4.1 with crate(memchr) < 3.0.0~)",
                "(crate(memchr/std) >= 2.4.1 with crate(memchr/std) < 3.0.0~)",
                "(crate(serde) >= 1.0.103 with crate(serde) < 2.0.0~)",
                "(crate(serde/alloc) >= 1.0.103 with crate(serde/alloc) < 2.0.0~)",
                "(crate(serde/derive) >= 1.0.103 with crate(serde/derive) < 2.0.0~)",
                "(crate(serde/std) >= 1.0.103 with crate(serde/std) < 2.0.0~)",
            },
        ),
        # default features with dev-dependencies
        ("libc-0.2.139.json", FeatureFlags(), True, set()),
        # default features without dev-dependencies
        ("libc-0.2.139.json", FeatureFlags(), False, set()),
        # default features with dev-dependencies
        (
            "predicates-2.1.5.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.60.0",
                "(crate(difflib/default) >= 0.4.0 with crate(difflib/default) < 0.5.0~)",
                "(crate(float-cmp/default) >= 0.9.0 with crate(float-cmp/default) < 0.10.0~)",
                "(crate(itertools/default) >= 0.10.0 with crate(itertools/default) < 0.11.0~)",
                "(crate(normalize-line-endings/default) >= 0.3.0 with crate(normalize-line-endings/default) < 0.4.0~)",
                "(crate(predicates-core/default) >= 1.0.0 with crate(predicates-core/default) < 2.0.0~)",
                "(crate(regex/default) >= 1.0.0 with crate(regex/default) < 2.0.0~)",
                "(crate(predicates-tree/default) >= 1.0.0 with crate(predicates-tree/default) < 2.0.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "predicates-2.1.5.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.60.0",
                "(crate(difflib/default) >= 0.4.0 with crate(difflib/default) < 0.5.0~)",
                "(crate(float-cmp/default) >= 0.9.0 with crate(float-cmp/default) < 0.10.0~)",
                "(crate(itertools/default) >= 0.10.0 with crate(itertools/default) < 0.11.0~)",
                "(crate(normalize-line-endings/default) >= 0.3.0 with crate(normalize-line-endings/default) < 0.4.0~)",
                "(crate(predicates-core/default) >= 1.0.0 with crate(predicates-core/default) < 2.0.0~)",
                "(crate(regex/default) >= 1.0.0 with crate(regex/default) < 2.0.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "proc-macro2-1.0.50.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.31",
                "(crate(unicode-ident/default) >= 1.0.0 with crate(unicode-ident/default) < 2.0.0~)",
                "(crate(quote) >= 1.0.0 with crate(quote) < 2.0.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "proc-macro2-1.0.50.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.31",
                "(crate(unicode-ident/default) >= 1.0.0 with crate(unicode-ident/default) < 2.0.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "quote-1.0.23.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.31",
                "(crate(proc-macro2) >= 1.0.40 with crate(proc-macro2) < 2.0.0~)",
                "(crate(proc-macro2/proc-macro) >= 1.0.40 with crate(proc-macro2/proc-macro) < 2.0.0~)",
                "(crate(rustversion/default) >= 1.0.0 with crate(rustversion/default) < 2.0.0~)",
                "(crate(trybuild/default) >= 1.0.66 with crate(trybuild/default) < 2.0.0~)",
                "(crate(trybuild/diff) >= 1.0.66 with crate(trybuild/diff) < 2.0.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "quote-1.0.23.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.31",
                "(crate(proc-macro2) >= 1.0.40 with crate(proc-macro2) < 2.0.0~)",
                "(crate(proc-macro2/proc-macro) >= 1.0.40 with crate(proc-macro2/proc-macro) < 2.0.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "rand-0.8.5.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.31",
                "(crate(rand_chacha) >= 0.3.0 with crate(rand_chacha) < 0.4.0~)",
                "(crate(rand_chacha/std) >= 0.3.0 with crate(rand_chacha/std) < 0.4.0~)",
                "(crate(rand_core/default) >= 0.6.0 with crate(rand_core/default) < 0.7.0~)",
                "(crate(rand_core/alloc) >= 0.6.0 with crate(rand_core/alloc) < 0.7.0~)",
                "(crate(rand_core/getrandom) >= 0.6.0 with crate(rand_core/getrandom) < 0.7.0~)",
                "(crate(rand_core/std) >= 0.6.0 with crate(rand_core/std) < 0.7.0~)",
                "(crate(bincode/default) >= 1.2.1 with crate(bincode/default) < 2.0.0~)",
                "(crate(rand_pcg/default) >= 0.3.0 with crate(rand_pcg/default) < 0.4.0~)",
                "(crate(libc) >= 0.2.22 with crate(libc) < 0.3.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "rand-0.8.5.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.31",
                "(crate(rand_chacha) >= 0.3.0 with crate(rand_chacha) < 0.4.0~)",
                "(crate(rand_chacha/std) >= 0.3.0 with crate(rand_chacha/std) < 0.4.0~)",
                "(crate(rand_core/default) >= 0.6.0 with crate(rand_core/default) < 0.7.0~)",
                "(crate(rand_core/alloc) >= 0.6.0 with crate(rand_core/alloc) < 0.7.0~)",
                "(crate(rand_core/getrandom) >= 0.6.0 with crate(rand_core/getrandom) < 0.7.0~)",
                "(crate(rand_core/std) >= 0.6.0 with crate(rand_core/std) < 0.7.0~)",
                "(crate(libc) >= 0.2.22 with crate(libc) < 0.3.0~)",
            },
        ),
        # default features with dev-dependencies
        ("rand_core-0.6.4.json", FeatureFlags(), True, {"rust >= 1.31"}),
        # default features without dev-dependencies
        ("rand_core-0.6.4.json", FeatureFlags(), False, {"rust >= 1.31"}),
        # default features with dev-dependencies
        (
            "regex-1.8.4.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.60.0",
                "(crate(aho-corasick/default) >= 1.0.0 with crate(aho-corasick/default) < 2.0.0~)",
                "(crate(memchr/default) >= 2.5.0 with crate(memchr/default) < 3.0.0~)",
                "(crate(regex-syntax/default) >= 0.7.2 with crate(regex-syntax/default) < 0.8.0~)",
                "(crate(regex-syntax/unicode) >= 0.7.2 with crate(regex-syntax/unicode) < 0.8.0~)",
                "(crate(regex-syntax/unicode-age) >= 0.7.2 with crate(regex-syntax/unicode-age) < 0.8.0~)",
                "(crate(regex-syntax/unicode-bool) >= 0.7.2 with crate(regex-syntax/unicode-bool) < 0.8.0~)",
                "(crate(regex-syntax/unicode-case) >= 0.7.2 with crate(regex-syntax/unicode-case) < 0.8.0~)",
                "(crate(regex-syntax/unicode-gencat) >= 0.7.2 with crate(regex-syntax/unicode-gencat) < 0.8.0~)",
                "(crate(regex-syntax/unicode-perl) >= 0.7.2 with crate(regex-syntax/unicode-perl) < 0.8.0~)",
                "(crate(regex-syntax/unicode-script) >= 0.7.2 with crate(regex-syntax/unicode-script) < 0.8.0~)",
                "(crate(regex-syntax/unicode-segment) >= 0.7.2 with crate(regex-syntax/unicode-segment) < 0.8.0~)",
                "(crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0~)",
                "(crate(quickcheck) >= 1.0.3 with crate(quickcheck) < 2.0.0~)",
                "(crate(rand) >= 0.8.3 with crate(rand) < 0.9.0~)",
                "(crate(rand/getrandom) >= 0.8.3 with crate(rand/getrandom) < 0.9.0~)",
                "(crate(rand/small_rng) >= 0.8.3 with crate(rand/small_rng) < 0.9.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "regex-1.8.4.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.60.0",
                "(crate(aho-corasick/default) >= 1.0.0 with crate(aho-corasick/default) < 2.0.0~)",
                "(crate(memchr/default) >= 2.5.0 with crate(memchr/default) < 3.0.0~)",
                "(crate(regex-syntax/default) >= 0.7.2 with crate(regex-syntax/default) < 0.8.0~)",
                "(crate(regex-syntax/unicode) >= 0.7.2 with crate(regex-syntax/unicode) < 0.8.0~)",
                "(crate(regex-syntax/unicode-age) >= 0.7.2 with crate(regex-syntax/unicode-age) < 0.8.0~)",
                "(crate(regex-syntax/unicode-bool) >= 0.7.2 with crate(regex-syntax/unicode-bool) < 0.8.0~)",
                "(crate(regex-syntax/unicode-case) >= 0.7.2 with crate(regex-syntax/unicode-case) < 0.8.0~)",
                "(crate(regex-syntax/unicode-gencat) >= 0.7.2 with crate(regex-syntax/unicode-gencat) < 0.8.0~)",
                "(crate(regex-syntax/unicode-perl) >= 0.7.2 with crate(regex-syntax/unicode-perl) < 0.8.0~)",
                "(crate(regex-syntax/unicode-script) >= 0.7.2 with crate(regex-syntax/unicode-script) < 0.8.0~)",
                "(crate(regex-syntax/unicode-segment) >= 0.7.2 with crate(regex-syntax/unicode-segment) < 0.8.0~)",
            },
        ),
        # default features with dev-dependencies
        ("regex-syntax-0.7.2.json", FeatureFlags(), True, {"rust >= 1.60.0"}),
        # default features without dev-dependencies
        ("regex-syntax-0.7.2.json", FeatureFlags(), False, {"rust >= 1.60.0"}),
        # default features with dev-dependencies
        (
            "rpm-sequoia-1.2.0.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.60",
                "(crate(anyhow/default) >= 1.0.0 with crate(anyhow/default) < 2.0.0~)",
                "(crate(buffered-reader) >= 1.0.0 with crate(buffered-reader) < 2.0.0~)",
                "(crate(chrono) >= 0.4.0 with crate(chrono) < 0.5.0~)",
                "(crate(chrono/std) >= 0.4.0 with crate(chrono/std) < 0.5.0~)",
                "(crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0~)",
                "(crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0~)",
                "(crate(sequoia-openpgp) >= 1.11.0 with crate(sequoia-openpgp) < 2.0.0~)",
                "(crate(sequoia-openpgp/crypto-nettle) >= 1.11.0 with crate(sequoia-openpgp/crypto-nettle) < 2.0.0~)",
                "(crate(sequoia-policy-config/default) >= 0.5.0 with crate(sequoia-policy-config/default) < 0.6.0~)",
                "(crate(thiserror/default) >= 1.0.0 with crate(thiserror/default) < 2.0.0~)",
                "(crate(assert_cmd/default) >= 2.0.0 with crate(assert_cmd/default) < 3.0.0~)",
                "(crate(cdylib-link-lines/default) >= 0.1.4 with crate(cdylib-link-lines/default) < 0.2.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "rpm-sequoia-1.2.0.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.60",
                "(crate(anyhow/default) >= 1.0.0 with crate(anyhow/default) < 2.0.0~)",
                "(crate(buffered-reader) >= 1.0.0 with crate(buffered-reader) < 2.0.0~)",
                "(crate(chrono) >= 0.4.0 with crate(chrono) < 0.5.0~)",
                "(crate(chrono/std) >= 0.4.0 with crate(chrono/std) < 0.5.0~)",
                "(crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0~)",
                "(crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0~)",
                "(crate(sequoia-openpgp) >= 1.11.0 with crate(sequoia-openpgp) < 2.0.0~)",
                "(crate(sequoia-openpgp/crypto-nettle) >= 1.11.0 with crate(sequoia-openpgp/crypto-nettle) < 2.0.0~)",
                "(crate(sequoia-policy-config/default) >= 0.5.0 with crate(sequoia-policy-config/default) < 0.6.0~)",
                "(crate(thiserror/default) >= 1.0.0 with crate(thiserror/default) < 2.0.0~)",
                "(crate(cdylib-link-lines/default) >= 0.1.4 with crate(cdylib-link-lines/default) < 0.2.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "rust_decimal-1.28.0.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.60",
                "(crate(arrayvec) >= 0.7.0 with crate(arrayvec) < 0.8.0~)",
                "(crate(arrayvec/std) >= 0.7.0 with crate(arrayvec/std) < 0.8.0~)",
                "(crate(bincode) >= 1.0.0 with crate(bincode) < 2.0.0~)",
                "(crate(borsh) >= 0.9.0 with crate(borsh) < 0.10.0~)",
                "(crate(borsh/std) >= 0.9.0 with crate(borsh/std) < 0.10.0~)",
                "(crate(bytecheck) >= 0.6.0 with crate(bytecheck) < 0.7.0~)",
                "(crate(bytecheck/std) >= 0.6.0 with crate(bytecheck/std) < 0.7.0~)",
                "(crate(byteorder) >= 1.0.0 with crate(byteorder) < 2.0.0~)",
                "(crate(byteorder/std) >= 1.0.0 with crate(byteorder/std) < 2.0.0~)",
                "(crate(bytes) >= 1.0.0 with crate(bytes) < 2.0.0~)",
                "(crate(bytes/std) >= 1.0.0 with crate(bytes/std) < 2.0.0~)",
                "(crate(criterion) >= 0.3.0 with crate(criterion) < 0.4.0~)",
                "(crate(csv/default) >= 1.0.0 with crate(csv/default) < 2.0.0~)",
                "(crate(futures) >= 0.3.0 with crate(futures) < 0.4.0~)",
                "(crate(num-traits) >= 0.2.0 with crate(num-traits) < 0.3.0~)",
                "(crate(num-traits/i128) >= 0.2.0 with crate(num-traits/i128) < 0.3.0~)",
                "(crate(rand) >= 0.8.0 with crate(rand) < 0.9.0~)",
                "(crate(rand/getrandom) >= 0.8.0 with crate(rand/getrandom) < 0.9.0~)",
                "(crate(rand/std) >= 0.8.0 with crate(rand/std) < 0.9.0~)",
                "(crate(rkyv) >= 0.7.0 with crate(rkyv) < 0.8.0~)",
                "(crate(rkyv/size_32) >= 0.7.0 with crate(rkyv/size_32) < 0.8.0~)",
                "(crate(rkyv/std) >= 0.7.0 with crate(rkyv/std) < 0.8.0~)",
                "(crate(serde) >= 1.0.0 with crate(serde) < 2.0.0~)",
                "(crate(serde/derive) >= 1.0.0 with crate(serde/derive) < 2.0.0~)",
                "(crate(serde/std) >= 1.0.0 with crate(serde/std) < 2.0.0~)",
                "(crate(serde_json/default) >= 1.0.0 with crate(serde_json/default) < 2.0.0~)",
                "(crate(serde_json/std) >= 1.0.0 with crate(serde_json/std) < 2.0.0~)",
                "(crate(tokio) >= 1.0.0 with crate(tokio) < 2.0.0~)",
                "(crate(tokio/macros) >= 1.0.0 with crate(tokio/macros) < 2.0.0~)",
                "(crate(tokio/rt-multi-thread) >= 1.0.0 with crate(tokio/rt-multi-thread) < 2.0.0~)",
                "(crate(tokio/test-util) >= 1.0.0 with crate(tokio/test-util) < 2.0.0~)",
                "(crate(version-sync) >= 0.9.0 with crate(version-sync) < 0.10.0~)",
                "(crate(version-sync/html_root_url_updated) >= 0.9.0 with crate(version-sync/html_root_url_updated) < 0.10.0~)",
                "(crate(version-sync/markdown_deps_updated) >= 0.9.0 with crate(version-sync/markdown_deps_updated) < 0.10.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "rust_decimal-1.28.0.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.60",
                "(crate(arrayvec) >= 0.7.0 with crate(arrayvec) < 0.8.0~)",
                "(crate(arrayvec/std) >= 0.7.0 with crate(arrayvec/std) < 0.8.0~)",
                "(crate(borsh) >= 0.9.0 with crate(borsh) < 0.10.0~)",
                "(crate(borsh/std) >= 0.9.0 with crate(borsh/std) < 0.10.0~)",
                "(crate(bytecheck) >= 0.6.0 with crate(bytecheck) < 0.7.0~)",
                "(crate(bytecheck/std) >= 0.6.0 with crate(bytecheck/std) < 0.7.0~)",
                "(crate(byteorder) >= 1.0.0 with crate(byteorder) < 2.0.0~)",
                "(crate(byteorder/std) >= 1.0.0 with crate(byteorder/std) < 2.0.0~)",
                "(crate(bytes) >= 1.0.0 with crate(bytes) < 2.0.0~)",
                "(crate(bytes/std) >= 1.0.0 with crate(bytes/std) < 2.0.0~)",
                "(crate(num-traits) >= 0.2.0 with crate(num-traits) < 0.3.0~)",
                "(crate(num-traits/i128) >= 0.2.0 with crate(num-traits/i128) < 0.3.0~)",
                "(crate(rand) >= 0.8.0 with crate(rand) < 0.9.0~)",
                "(crate(rand/std) >= 0.8.0 with crate(rand/std) < 0.9.0~)",
                "(crate(rkyv) >= 0.7.0 with crate(rkyv) < 0.8.0~)",
                "(crate(rkyv/size_32) >= 0.7.0 with crate(rkyv/size_32) < 0.8.0~)",
                "(crate(rkyv/std) >= 0.7.0 with crate(rkyv/std) < 0.8.0~)",
                "(crate(serde) >= 1.0.0 with crate(serde) < 2.0.0~)",
                "(crate(serde/std) >= 1.0.0 with crate(serde/std) < 2.0.0~)",
                "(crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0~)",
                "(crate(serde_json/std) >= 1.0.0 with crate(serde_json/std) < 2.0.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "rustix-0.36.8.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.48",
                "(crate(bitflags/default) >= 1.2.1 with crate(bitflags/default) < 2.0.0~)",
                "(crate(io-lifetimes) >= 1.0.0 with crate(io-lifetimes) < 2.0.0~)",
                "(crate(io-lifetimes/close) >= 1.0.0 with crate(io-lifetimes/close) < 2.0.0~)",
                "(crate(flate2/default) >= 1.0.0 with crate(flate2/default) < 2.0.0~)",
                "(crate(libc/default) >= 0.2.133 with crate(libc/default) < 0.3.0~)",
                "(crate(errno) >= 0.2.8 with crate(errno) < 0.3.0~)",
                "(crate(memoffset/default) >= 0.7.1 with crate(memoffset/default) < 0.8.0~)",
                "(crate(serial_test/default) >= 0.6.0 with crate(serial_test/default) < 0.7.0~)",
                "(crate(tempfile/default) >= 3.2.0 with crate(tempfile/default) < 4.0.0~)",
                "(crate(linux-raw-sys) >= 0.1.2 with crate(linux-raw-sys) < 0.2.0~)",
                "(crate(linux-raw-sys/general) >= 0.1.2 with crate(linux-raw-sys/general) < 0.2.0~)",
                "(crate(linux-raw-sys/no_std) >= 0.1.2 with crate(linux-raw-sys/no_std) < 0.2.0~)",
                "(crate(criterion/default) >= 0.4.0 with crate(criterion/default) < 0.5.0~)",
                "(crate(libc/extra_traits) >= 0.2.133 with crate(libc/extra_traits) < 0.3.0~)",
                "(crate(linux-raw-sys/errno) >= 0.1.2 with crate(linux-raw-sys/errno) < 0.2.0~)",
                "(crate(linux-raw-sys/ioctl) >= 0.1.2 with crate(linux-raw-sys/ioctl) < 0.2.0~)",
                "(crate(windows-sys/default) >= 0.45.0 with crate(windows-sys/default) < 0.46.0~)",
                "(crate(windows-sys/Win32_Foundation) >= 0.45.0 with crate(windows-sys/Win32_Foundation) < 0.46.0~)",
                "(crate(windows-sys/Win32_Networking_WinSock) >= 0.45.0 with crate(windows-sys/Win32_Networking_WinSock) < 0.46.0~)",
                "(crate(windows-sys/Win32_NetworkManagement_IpHelper) >= 0.45.0 with crate(windows-sys/Win32_NetworkManagement_IpHelper) < 0.46.0~)",
                "(crate(windows-sys/Win32_System_Threading) >= 0.45.0 with crate(windows-sys/Win32_System_Threading) < 0.46.0~)",
                "(crate(ctor/default) >= 0.1.21 with crate(ctor/default) < 0.2.0~)",
            },
        ),
        # default features + cc with dev-dependencies
        (
            "rustix-0.36.8.json",
            FeatureFlags(features=["cc"]),
            True,
            {
                "rust >= 1.48",
                "(crate(bitflags/default) >= 1.2.1 with crate(bitflags/default) < 2.0.0~)",
                "(crate(io-lifetimes) >= 1.0.0 with crate(io-lifetimes) < 2.0.0~)",
                "(crate(io-lifetimes/close) >= 1.0.0 with crate(io-lifetimes/close) < 2.0.0~)",
                "(crate(flate2/default) >= 1.0.0 with crate(flate2/default) < 2.0.0~)",
                "(crate(libc/default) >= 0.2.133 with crate(libc/default) < 0.3.0~)",
                "(crate(errno) >= 0.2.8 with crate(errno) < 0.3.0~)",
                "(crate(memoffset/default) >= 0.7.1 with crate(memoffset/default) < 0.8.0~)",
                "(crate(serial_test/default) >= 0.6.0 with crate(serial_test/default) < 0.7.0~)",
                "(crate(tempfile/default) >= 3.2.0 with crate(tempfile/default) < 4.0.0~)",
                "(crate(cc/default) >= 1.0.68 with crate(cc/default) < 2.0.0~)",
                "(crate(linux-raw-sys) >= 0.1.2 with crate(linux-raw-sys) < 0.2.0~)",
                "(crate(linux-raw-sys/general) >= 0.1.2 with crate(linux-raw-sys/general) < 0.2.0~)",
                "(crate(linux-raw-sys/no_std) >= 0.1.2 with crate(linux-raw-sys/no_std) < 0.2.0~)",
                "(crate(criterion/default) >= 0.4.0 with crate(criterion/default) < 0.5.0~)",
                "(crate(libc/extra_traits) >= 0.2.133 with crate(libc/extra_traits) < 0.3.0~)",
                "(crate(linux-raw-sys/errno) >= 0.1.2 with crate(linux-raw-sys/errno) < 0.2.0~)",
                "(crate(linux-raw-sys/ioctl) >= 0.1.2 with crate(linux-raw-sys/ioctl) < 0.2.0~)",
                "(crate(windows-sys/default) >= 0.45.0 with crate(windows-sys/default) < 0.46.0~)",
                "(crate(windows-sys/Win32_Foundation) >= 0.45.0 with crate(windows-sys/Win32_Foundation) < 0.46.0~)",
                "(crate(windows-sys/Win32_Networking_WinSock) >= 0.45.0 with crate(windows-sys/Win32_Networking_WinSock) < 0.46.0~)",
                "(crate(windows-sys/Win32_NetworkManagement_IpHelper) >= 0.45.0 with crate(windows-sys/Win32_NetworkManagement_IpHelper) < 0.46.0~)",
                "(crate(windows-sys/Win32_System_Threading) >= 0.45.0 with crate(windows-sys/Win32_System_Threading) < 0.46.0~)",
                "(crate(ctor/default) >= 0.1.21 with crate(ctor/default) < 0.2.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "rustix-0.36.8.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.48",
                "(crate(bitflags/default) >= 1.2.1 with crate(bitflags/default) < 2.0.0~)",
                "(crate(io-lifetimes) >= 1.0.0 with crate(io-lifetimes) < 2.0.0~)",
                "(crate(io-lifetimes/close) >= 1.0.0 with crate(io-lifetimes/close) < 2.0.0~)",
                "(crate(libc/default) >= 0.2.133 with crate(libc/default) < 0.3.0~)",
                "(crate(errno) >= 0.2.8 with crate(errno) < 0.3.0~)",
                "(crate(linux-raw-sys) >= 0.1.2 with crate(linux-raw-sys) < 0.2.0~)",
                "(crate(linux-raw-sys/general) >= 0.1.2 with crate(linux-raw-sys/general) < 0.2.0~)",
                "(crate(linux-raw-sys/no_std) >= 0.1.2 with crate(linux-raw-sys/no_std) < 0.2.0~)",
                "(crate(libc/extra_traits) >= 0.2.133 with crate(libc/extra_traits) < 0.3.0~)",
                "(crate(linux-raw-sys/errno) >= 0.1.2 with crate(linux-raw-sys/errno) < 0.2.0~)",
                "(crate(linux-raw-sys/ioctl) >= 0.1.2 with crate(linux-raw-sys/ioctl) < 0.2.0~)",
                "(crate(windows-sys/default) >= 0.45.0 with crate(windows-sys/default) < 0.46.0~)",
                "(crate(windows-sys/Win32_Foundation) >= 0.45.0 with crate(windows-sys/Win32_Foundation) < 0.46.0~)",
                "(crate(windows-sys/Win32_Networking_WinSock) >= 0.45.0 with crate(windows-sys/Win32_Networking_WinSock) < 0.46.0~)",
                "(crate(windows-sys/Win32_NetworkManagement_IpHelper) >= 0.45.0 with crate(windows-sys/Win32_NetworkManagement_IpHelper) < 0.46.0~)",
                "(crate(windows-sys/Win32_System_Threading) >= 0.45.0 with crate(windows-sys/Win32_System_Threading) < 0.46.0~)",
            },
        ),
        # default features + cc without dev-dependencies
        (
            "rustix-0.36.8.json",
            FeatureFlags(features=["cc"]),
            False,
            {
                "rust >= 1.48",
                "(crate(bitflags/default) >= 1.2.1 with crate(bitflags/default) < 2.0.0~)",
                "(crate(io-lifetimes) >= 1.0.0 with crate(io-lifetimes) < 2.0.0~)",
                "(crate(io-lifetimes/close) >= 1.0.0 with crate(io-lifetimes/close) < 2.0.0~)",
                "(crate(libc/default) >= 0.2.133 with crate(libc/default) < 0.3.0~)",
                "(crate(errno) >= 0.2.8 with crate(errno) < 0.3.0~)",
                "(crate(cc/default) >= 1.0.68 with crate(cc/default) < 2.0.0~)",
                "(crate(linux-raw-sys) >= 0.1.2 with crate(linux-raw-sys) < 0.2.0~)",
                "(crate(linux-raw-sys/general) >= 0.1.2 with crate(linux-raw-sys/general) < 0.2.0~)",
                "(crate(linux-raw-sys/no_std) >= 0.1.2 with crate(linux-raw-sys/no_std) < 0.2.0~)",
                "(crate(libc/extra_traits) >= 0.2.133 with crate(libc/extra_traits) < 0.3.0~)",
                "(crate(linux-raw-sys/errno) >= 0.1.2 with crate(linux-raw-sys/errno) < 0.2.0~)",
                "(crate(linux-raw-sys/ioctl) >= 0.1.2 with crate(linux-raw-sys/ioctl) < 0.2.0~)",
                "(crate(windows-sys/default) >= 0.45.0 with crate(windows-sys/default) < 0.46.0~)",
                "(crate(windows-sys/Win32_Foundation) >= 0.45.0 with crate(windows-sys/Win32_Foundation) < 0.46.0~)",
                "(crate(windows-sys/Win32_Networking_WinSock) >= 0.45.0 with crate(windows-sys/Win32_Networking_WinSock) < 0.46.0~)",
                "(crate(windows-sys/Win32_NetworkManagement_IpHelper) >= 0.45.0 with crate(windows-sys/Win32_NetworkManagement_IpHelper) < 0.46.0~)",
                "(crate(windows-sys/Win32_System_Threading) >= 0.45.0 with crate(windows-sys/Win32_System_Threading) < 0.46.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "serde-1.0.152.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.13",
                "(crate(serde_derive/default) >= 1.0.0 with crate(serde_derive/default) < 2.0.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "serde-1.0.152.json",
            FeatureFlags(),
            False,
            {"rust >= 1.13"},
        ),
        # default features with dev-dependencies
        (
            "serde_derive-1.0.152.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.31",
                "(crate(proc-macro2/default) >= 1.0.0 with crate(proc-macro2/default) < 2.0.0~)",
                "(crate(quote/default) >= 1.0.0 with crate(quote/default) < 2.0.0~)",
                "(crate(syn/default) >= 1.0.104 with crate(syn/default) < 2.0.0~)",
                "(crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "serde_derive-1.0.152.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.31",
                "(crate(proc-macro2/default) >= 1.0.0 with crate(proc-macro2/default) < 2.0.0~)",
                "(crate(quote/default) >= 1.0.0 with crate(quote/default) < 2.0.0~)",
                "(crate(syn/default) >= 1.0.104 with crate(syn/default) < 2.0.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "sha1collisiondetection-0.3.1.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.60",
                "(crate(digest/default) >= 0.10.0 with crate(digest/default) < 0.11.0~)",
                "(crate(digest/std) >= 0.10.0 with crate(digest/std) < 0.11.0~)",
                "(crate(generic-array/default) >= 0.12.0 with crate(generic-array/default) < 0.15.0~)",
                "(crate(getrandom/default) >= 0.2.0 with crate(getrandom/default) < 0.3.0~)",
                "(crate(hex-literal/default) >= 0.3.0 with crate(hex-literal/default) < 0.4.0~)",
                "(crate(sha1/default) >= 0.10.0 with crate(sha1/default) < 0.11.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "sha1collisiondetection-0.3.1.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.60",
                "(crate(digest/default) >= 0.10.0 with crate(digest/default) < 0.11.0~)",
                "(crate(digest/std) >= 0.10.0 with crate(digest/std) < 0.11.0~)",
                "(crate(generic-array/default) >= 0.12.0 with crate(generic-array/default) < 0.15.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "syn-1.0.107.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.31",
                "(crate(proc-macro2) >= 1.0.46 with crate(proc-macro2) < 2.0.0~)",
                "(crate(proc-macro2/proc-macro) >= 1.0.46 with crate(proc-macro2/proc-macro) < 2.0.0~)",
                "(crate(quote) >= 1.0.0 with crate(quote) < 2.0.0~)",
                "(crate(quote/proc-macro) >= 1.0.0 with crate(quote/proc-macro) < 2.0.0~)",
                "(crate(unicode-ident/default) >= 1.0.0 with crate(unicode-ident/default) < 2.0.0~)",
                "(crate(anyhow/default) >= 1.0.0 with crate(anyhow/default) < 2.0.0~)",
                "(crate(automod/default) >= 1.0.0 with crate(automod/default) < 2.0.0~)",
                "(crate(flate2/default) >= 1.0.0 with crate(flate2/default) < 2.0.0~)",
                "(crate(insta/default) >= 1.0.0 with crate(insta/default) < 2.0.0~)",
                "(crate(rayon/default) >= 1.0.0 with crate(rayon/default) < 2.0.0~)",
                "(crate(ref-cast/default) >= 1.0.0 with crate(ref-cast/default) < 2.0.0~)",
                "(crate(regex/default) >= 1.0.0 with crate(regex/default) < 2.0.0~)",
                "(crate(reqwest/default) >= 0.11.0 with crate(reqwest/default) < 0.12.0~)",
                "(crate(reqwest/blocking) >= 0.11.0 with crate(reqwest/blocking) < 0.12.0~)",
                "(crate(syn-test-suite/default) >= 0.0.0 with crate(syn-test-suite/default) < 1.0.0~)",
                "(crate(tar/default) >= 0.4.16 with crate(tar/default) < 0.5.0~)",
                "(crate(termcolor/default) >= 1.0.0 with crate(termcolor/default) < 2.0.0~)",
                "(crate(walkdir/default) >= 2.1.0 with crate(walkdir/default) < 3.0.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "syn-1.0.107.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.31",
                "(crate(proc-macro2) >= 1.0.46 with crate(proc-macro2) < 2.0.0~)",
                "(crate(proc-macro2/proc-macro) >= 1.0.46 with crate(proc-macro2/proc-macro) < 2.0.0~)",
                "(crate(quote) >= 1.0.0 with crate(quote) < 2.0.0~)",
                "(crate(quote/proc-macro) >= 1.0.0 with crate(quote/proc-macro) < 2.0.0~)",
                "(crate(unicode-ident/default) >= 1.0.0 with crate(unicode-ident/default) < 2.0.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "time-0.3.17.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.60.0",
                "crate(time-core/default) = 0.1.0",
                "(crate(quickcheck_macros/default) >= 1.0.0 with crate(quickcheck_macros/default) < 2.0.0~)",
                "(crate(rand) >= 0.8.4 with crate(rand) < 0.9.0~)",
                "(crate(serde) >= 1.0.126 with crate(serde) < 2.0.0~)",
                "(crate(serde/alloc) >= 1.0.126 with crate(serde/alloc) < 2.0.0~)",
                "(crate(serde/derive) >= 1.0.126 with crate(serde/derive) < 2.0.0~)",
                "(crate(serde_json/default) >= 1.0.68 with crate(serde_json/default) < 2.0.0~)",
                "(crate(serde_test/default) >= 1.0.126 with crate(serde_test/default) < 2.0.0~)",
                "crate(time-macros/default) = 0.2.6",
                "(crate(trybuild/default) >= 1.0.68 with crate(trybuild/default) < 2.0.0~)",
                "(crate(criterion) >= 0.4.0 with crate(criterion) < 0.5.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "time-0.3.17.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.60.0",
                "(crate(serde) >= 1.0.126 with crate(serde) < 2.0.0~)",
                "(crate(serde/alloc) >= 1.0.126 with crate(serde/alloc) < 2.0.0~)",
                "crate(time-core/default) = 0.1.0",
            },
        ),
        # default features with dev-dependencies
        (
            "tokio-1.25.0.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.49",
                "(crate(pin-project-lite/default) >= 0.2.0 with crate(pin-project-lite/default) < 0.3.0~)",
                "(crate(async-stream/default) >= 0.3.0 with crate(async-stream/default) < 0.4.0~)",
                "(crate(futures/default) >= 0.3.0 with crate(futures/default) < 0.4.0~)",
                "(crate(futures/async-await) >= 0.3.0 with crate(futures/async-await) < 0.4.0~)",
                "(crate(mockall/default) >= 0.11.1 with crate(mockall/default) < 0.12.0~)",
                "(crate(tempfile/default) >= 3.1.0 with crate(tempfile/default) < 4.0.0~)",
                "(crate(tokio-stream/default) >= 0.1.0 with crate(tokio-stream/default) < 0.2.0~)",
                "(crate(tokio-test/default) >= 0.4.0 with crate(tokio-test/default) < 0.5.0~)",
                "(crate(autocfg/default) >= 1.1.0 with crate(autocfg/default) < 2.0.0~)",
                "(crate(wasm-bindgen-test/default) >= 0.3.0 with crate(wasm-bindgen-test/default) < 0.4.0~)",
                "(crate(windows-sys/default) >= 0.42.0 with crate(windows-sys/default) < 0.43.0~)",
                "(crate(windows-sys/Win32_Foundation) >= 0.42.0 with crate(windows-sys/Win32_Foundation) < 0.43.0~)",
                "(crate(windows-sys/Win32_Security_Authorization) >= 0.42.0 with crate(windows-sys/Win32_Security_Authorization) < 0.43.0~)",
                "(crate(loom/default) >= 0.5.2 with crate(loom/default) < 0.6.0~)",
                "(crate(loom/futures) >= 0.5.2 with crate(loom/futures) < 0.6.0~)",
                "(crate(loom/checkpoint) >= 0.5.2 with crate(loom/checkpoint) < 0.6.0~)",
                "(crate(rand/default) >= 0.8.0 with crate(rand/default) < 0.9.0~)",
                "(crate(proptest/default) >= 1.0.0 with crate(proptest/default) < 2.0.0~)",
                "(crate(socket2/default) >= 0.4.0 with crate(socket2/default) < 0.5.0~)",
                "(crate(mio-aio/default) >= 0.7.0 with crate(mio-aio/default) < 0.8.0~)",
                "(crate(mio-aio/tokio) >= 0.7.0 with crate(mio-aio/tokio) < 0.8.0~)",
                "(crate(libc/default) >= 0.2.42 with crate(libc/default) < 0.3.0~)",
                "(crate(nix) >= 0.26.0 with crate(nix) < 0.27.0~)",
                "(crate(nix/fs) >= 0.26.0 with crate(nix/fs) < 0.27.0~)",
                "(crate(nix/socket) >= 0.26.0 with crate(nix/socket) < 0.27.0~)",
                "(crate(ntapi/default) >= 0.3.6 with crate(ntapi/default) < 0.4.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "tokio-1.25.0.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.49",
                "(crate(pin-project-lite/default) >= 0.2.0 with crate(pin-project-lite/default) < 0.3.0~)",
                "(crate(autocfg/default) >= 1.1.0 with crate(autocfg/default) < 2.0.0~)",
                "(crate(windows-sys/default) >= 0.42.0 with crate(windows-sys/default) < 0.43.0~)",
                "(crate(windows-sys/Win32_Foundation) >= 0.42.0 with crate(windows-sys/Win32_Foundation) < 0.43.0~)",
                "(crate(windows-sys/Win32_Security_Authorization) >= 0.42.0 with crate(windows-sys/Win32_Security_Authorization) < 0.43.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "unicode-xid-0.2.4.json",
            FeatureFlags(),
            True,
            {"rust >= 1.17", "(crate(criterion/default) >= 0.3.0 with crate(criterion/default) < 0.4.0~)"},
        ),
        # default features without dev-dependencies
        ("unicode-xid-0.2.4.json", FeatureFlags(), False, {"rust >= 1.17"}),
        # default features with dev-dependencies
        (
            "zbus-3.8.0.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.60",
                "(crate(async-broadcast/default) >= 0.5.0 with crate(async-broadcast/default) < 0.6.0~)",
                "(crate(async-executor/default) >= 1.5.0 with crate(async-executor/default) < 2.0.0~)",
                "(crate(async-io/default) >= 1.12.0 with crate(async-io/default) < 2.0.0~)",
                "(crate(async-lock/default) >= 2.6.0 with crate(async-lock/default) < 3.0.0~)",
                "(crate(async-recursion/default) >= 1.0.0 with crate(async-recursion/default) < 2.0.0~)",
                "(crate(async-task/default) >= 4.3.0 with crate(async-task/default) < 5.0.0~)",
                "(crate(async-trait/default) >= 0.1.58 with crate(async-trait/default) < 0.2.0~)",
                "(crate(byteorder/default) >= 1.4.3 with crate(byteorder/default) < 2.0.0~)",
                "(crate(derivative/default) >= 2.2.0 with crate(derivative/default) < 3.0.0~)",
                "(crate(dirs/default) >= 4.0.0 with crate(dirs/default) < 5.0.0~)",
                "(crate(enumflags2/default) >= 0.7.5 with crate(enumflags2/default) < 0.8.0~)",
                "(crate(enumflags2/serde) >= 0.7.5 with crate(enumflags2/serde) < 0.8.0~)",
                "(crate(event-listener/default) >= 2.5.3 with crate(event-listener/default) < 3.0.0~)",
                "(crate(futures-core/default) >= 0.3.25 with crate(futures-core/default) < 0.4.0~)",
                "(crate(futures-sink/default) >= 0.3.25 with crate(futures-sink/default) < 0.4.0~)",
                "(crate(futures-util/sink) >= 0.3.25 with crate(futures-util/sink) < 0.4.0~)",
                "(crate(futures-util/std) >= 0.3.25 with crate(futures-util/std) < 0.4.0~)",
                "(crate(hex/default) >= 0.4.3 with crate(hex/default) < 0.5.0~)",
                "(crate(nix/default) >= 0.25.0 with crate(nix/default) < 0.26.0~)",
                "(crate(once_cell/default) >= 1.4.0 with crate(once_cell/default) < 2.0.0~)",
                "(crate(ordered-stream/default) >= 0.1.4 with crate(ordered-stream/default) < 0.2.0~)",
                "(crate(rand/default) >= 0.8.5 with crate(rand/default) < 0.9.0~)",
                "(crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0~)",
                "(crate(serde/derive) >= 1.0.0 with crate(serde/derive) < 2.0.0~)",
                "(crate(serde_repr/default) >= 0.1.9 with crate(serde_repr/default) < 0.2.0~)",
                "(crate(sha1/default) >= 0.10.5 with crate(sha1/default) < 0.11.0~)",
                "(crate(sha1/std) >= 0.10.5 with crate(sha1/std) < 0.11.0~)",
                "(crate(static_assertions/default) >= 1.1.0 with crate(static_assertions/default) < 2.0.0~)",
                "(crate(tracing/default) >= 0.1.37 with crate(tracing/default) < 0.2.0~)",
                "crate(zbus_macros/default) = 3.8.0",
                "(crate(zbus_names/default) >= 2.5.0 with crate(zbus_names/default) < 3.0.0~)",
                "(crate(zvariant) >= 3.10.0 with crate(zvariant) < 4.0.0~)",
                "(crate(zvariant/enumflags2) >= 3.10.0 with crate(zvariant/enumflags2) < 4.0.0~)",
                "(crate(async-std/default) >= 1.12.0 with crate(async-std/default) < 2.0.0~)",
                "(crate(async-std/attributes) >= 1.12.0 with crate(async-std/attributes) < 2.0.0~)",
                "(crate(doc-comment/default) >= 0.3.3 with crate(doc-comment/default) < 0.4.0~)",
                "(crate(futures-util/default) >= 0.3.25 with crate(futures-util/default) < 0.4.0~)",
                "(crate(ntest/default) >= 0.9.0 with crate(ntest/default) < 0.10.0~)",
                "(crate(tempfile/default) >= 3.3.0 with crate(tempfile/default) < 4.0.0~)",
                "(crate(test-log) >= 0.2.11 with crate(test-log) < 0.3.0~)",
                "(crate(test-log/trace) >= 0.2.11 with crate(test-log/trace) < 0.3.0~)",
                "(crate(tokio/default) >= 1.0.0 with crate(tokio/default) < 2.0.0~)",
                "(crate(tokio/macros) >= 1.0.0 with crate(tokio/macros) < 2.0.0~)",
                "(crate(tokio/rt-multi-thread) >= 1.0.0 with crate(tokio/rt-multi-thread) < 2.0.0~)",
                "(crate(tokio/fs) >= 1.0.0 with crate(tokio/fs) < 2.0.0~)",
                "(crate(tokio/io-util) >= 1.0.0 with crate(tokio/io-util) < 2.0.0~)",
                "(crate(tokio/net) >= 1.0.0 with crate(tokio/net) < 2.0.0~)",
                "(crate(tokio/sync) >= 1.0.0 with crate(tokio/sync) < 2.0.0~)",
                "(crate(tracing-subscriber) >= 0.3.16 with crate(tracing-subscriber) < 0.4.0~)",
                "(crate(tracing-subscriber/env-filter) >= 0.3.16 with crate(tracing-subscriber/env-filter) < 0.4.0~)",
                "(crate(tracing-subscriber/fmt) >= 0.3.16 with crate(tracing-subscriber/fmt) < 0.4.0~)",
                "(crate(uds_windows/default) >= 1.0.2 with crate(uds_windows/default) < 2.0.0~)",
                "(crate(winapi/default) >= 0.3.0 with crate(winapi/default) < 0.4.0~)",
                "(crate(winapi/handleapi) >= 0.3.0 with crate(winapi/handleapi) < 0.4.0~)",
                "(crate(winapi/iphlpapi) >= 0.3.0 with crate(winapi/iphlpapi) < 0.4.0~)",
                "(crate(winapi/memoryapi) >= 0.3.0 with crate(winapi/memoryapi) < 0.4.0~)",
                "(crate(winapi/processthreadsapi) >= 0.3.0 with crate(winapi/processthreadsapi) < 0.4.0~)",
                "(crate(winapi/sddl) >= 0.3.0 with crate(winapi/sddl) < 0.4.0~)",
                "(crate(winapi/securitybaseapi) >= 0.3.0 with crate(winapi/securitybaseapi) < 0.4.0~)",
                "(crate(winapi/synchapi) >= 0.3.0 with crate(winapi/synchapi) < 0.4.0~)",
                "(crate(winapi/tcpmib) >= 0.3.0 with crate(winapi/tcpmib) < 0.4.0~)",
                "(crate(winapi/winbase) >= 0.3.0 with crate(winapi/winbase) < 0.4.0~)",
                "(crate(winapi/winerror) >= 0.3.0 with crate(winapi/winerror) < 0.4.0~)",
                "(crate(winapi/winsock2) >= 0.3.0 with crate(winapi/winsock2) < 0.4.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "zbus-3.8.0.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.60",
                "(crate(async-broadcast/default) >= 0.5.0 with crate(async-broadcast/default) < 0.6.0~)",
                "(crate(async-executor/default) >= 1.5.0 with crate(async-executor/default) < 2.0.0~)",
                "(crate(async-io/default) >= 1.12.0 with crate(async-io/default) < 2.0.0~)",
                "(crate(async-lock/default) >= 2.6.0 with crate(async-lock/default) < 3.0.0~)",
                "(crate(async-recursion/default) >= 1.0.0 with crate(async-recursion/default) < 2.0.0~)",
                "(crate(async-task/default) >= 4.3.0 with crate(async-task/default) < 5.0.0~)",
                "(crate(async-trait/default) >= 0.1.58 with crate(async-trait/default) < 0.2.0~)",
                "(crate(byteorder/default) >= 1.4.3 with crate(byteorder/default) < 2.0.0~)",
                "(crate(derivative/default) >= 2.2.0 with crate(derivative/default) < 3.0.0~)",
                "(crate(dirs/default) >= 4.0.0 with crate(dirs/default) < 5.0.0~)",
                "(crate(enumflags2/default) >= 0.7.5 with crate(enumflags2/default) < 0.8.0~)",
                "(crate(enumflags2/serde) >= 0.7.5 with crate(enumflags2/serde) < 0.8.0~)",
                "(crate(event-listener/default) >= 2.5.3 with crate(event-listener/default) < 3.0.0~)",
                "(crate(futures-core/default) >= 0.3.25 with crate(futures-core/default) < 0.4.0~)",
                "(crate(futures-sink/default) >= 0.3.25 with crate(futures-sink/default) < 0.4.0~)",
                "(crate(futures-util) >= 0.3.25 with crate(futures-util) < 0.4.0~)",
                "(crate(futures-util/sink) >= 0.3.25 with crate(futures-util/sink) < 0.4.0~)",
                "(crate(futures-util/std) >= 0.3.25 with crate(futures-util/std) < 0.4.0~)",
                "(crate(hex/default) >= 0.4.3 with crate(hex/default) < 0.5.0~)",
                "(crate(nix/default) >= 0.25.0 with crate(nix/default) < 0.26.0~)",
                "(crate(once_cell/default) >= 1.4.0 with crate(once_cell/default) < 2.0.0~)",
                "(crate(ordered-stream/default) >= 0.1.4 with crate(ordered-stream/default) < 0.2.0~)",
                "(crate(rand/default) >= 0.8.5 with crate(rand/default) < 0.9.0~)",
                "(crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0~)",
                "(crate(serde/derive) >= 1.0.0 with crate(serde/derive) < 2.0.0~)",
                "(crate(serde_repr/default) >= 0.1.9 with crate(serde_repr/default) < 0.2.0~)",
                "(crate(sha1/default) >= 0.10.5 with crate(sha1/default) < 0.11.0~)",
                "(crate(sha1/std) >= 0.10.5 with crate(sha1/std) < 0.11.0~)",
                "(crate(static_assertions/default) >= 1.1.0 with crate(static_assertions/default) < 2.0.0~)",
                "(crate(tracing/default) >= 0.1.37 with crate(tracing/default) < 0.2.0~)",
                "crate(zbus_macros/default) = 3.8.0",
                "(crate(zbus_names/default) >= 2.5.0 with crate(zbus_names/default) < 3.0.0~)",
                "(crate(zvariant) >= 3.10.0 with crate(zvariant) < 4.0.0~)",
                "(crate(zvariant/enumflags2) >= 3.10.0 with crate(zvariant/enumflags2) < 4.0.0~)",
                "(crate(uds_windows/default) >= 1.0.2 with crate(uds_windows/default) < 2.0.0~)",
                "(crate(winapi/default) >= 0.3.0 with crate(winapi/default) < 0.4.0~)",
                "(crate(winapi/handleapi) >= 0.3.0 with crate(winapi/handleapi) < 0.4.0~)",
                "(crate(winapi/iphlpapi) >= 0.3.0 with crate(winapi/iphlpapi) < 0.4.0~)",
                "(crate(winapi/memoryapi) >= 0.3.0 with crate(winapi/memoryapi) < 0.4.0~)",
                "(crate(winapi/processthreadsapi) >= 0.3.0 with crate(winapi/processthreadsapi) < 0.4.0~)",
                "(crate(winapi/sddl) >= 0.3.0 with crate(winapi/sddl) < 0.4.0~)",
                "(crate(winapi/securitybaseapi) >= 0.3.0 with crate(winapi/securitybaseapi) < 0.4.0~)",
                "(crate(winapi/synchapi) >= 0.3.0 with crate(winapi/synchapi) < 0.4.0~)",
                "(crate(winapi/tcpmib) >= 0.3.0 with crate(winapi/tcpmib) < 0.4.0~)",
                "(crate(winapi/winbase) >= 0.3.0 with crate(winapi/winbase) < 0.4.0~)",
                "(crate(winapi/winerror) >= 0.3.0 with crate(winapi/winerror) < 0.4.0~)",
                "(crate(winapi/winsock2) >= 0.3.0 with crate(winapi/winsock2) < 0.4.0~)",
            },
        ),
    ],
    ids=short_repr,
)
def test_rpm_buildrequires(filename: str, flags: FeatureFlags, with_dev_deps: bool, expected: set[str]):
    metadata = load_metadata_from_resource(filename)
    assert buildrequires(metadata.packages[0], flags, with_dev_deps) == expected


@pytest.mark.parametrize(
    "filename,flags,with_dev_deps,expected",
    [
        # default features with dev-dependencies
        (
            "espanso-2.1.8.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.31",
                "(crate(anyhow/default) >= 1.0.38 with crate(anyhow/default) < 2.0.0~)",
                "(crate(caps/default) >= 0.5.2 with crate(caps/default) < 0.6.0~)",
                "(crate(cc/default) >= 1.0.73 with crate(cc/default) < 2.0.0~)",
                "(crate(chrono/default) >= 0.4.19 with crate(chrono/default) < 0.5.0~)",
                "(crate(chrono/unstable-locales) >= 0.4.19 with crate(chrono/unstable-locales) < 0.5.0~)",
                "(crate(clap/default) >= 2.33.3 with crate(clap/default) < 3.0.0~)",
                "(crate(colored/default) >= 2.0.0 with crate(colored/default) < 3.0.0~)",
                "(crate(const_format/default) >= 0.2.14 with crate(const_format/default) < 0.3.0~)",
                "(crate(crossbeam/default) >= 0.8.0 with crate(crossbeam/default) < 0.9.0~)",
                "(crate(dialoguer/default) >= 0.8.0 with crate(dialoguer/default) < 0.9.0~)",
                "(crate(dirs/default) >= 3.0.1 with crate(dirs/default) < 4.0.0~)",
                "(crate(dunce/default) >= 1.0.1 with crate(dunce/default) < 2.0.0~)",
                "(crate(enum-as-inner/default) >= 0.3.3 with crate(enum-as-inner/default) < 0.4.0~)",
                "(crate(fs_extra/default) >= 1.2.0 with crate(fs_extra/default) < 2.0.0~)",
                "(crate(fs2/default) >= 0.4.3 with crate(fs2/default) < 0.5.0~)",
                "(crate(glob/default) >= 0.3.0 with crate(glob/default) < 0.4.0~)",
                "(crate(hex/default) >= 0.4.3 with crate(hex/default) < 0.5.0~)",
                "(crate(html2text/default) >= 0.2.1 with crate(html2text/default) < 0.3.0~)",
                "(crate(include_dir/default) >= 0.6.0 with crate(include_dir/default) < 0.7.0~)",
                "(crate(include_dir/search) >= 0.6.0 with crate(include_dir/search) < 0.7.0~)",
                "(crate(indoc/default) >= 1.0.3 with crate(indoc/default) < 2.0.0~)",
                "(crate(itertools/default) >= 0.10.0 with crate(itertools/default) < 0.11.0~)",
                "(crate(lazycell/default) >= 1.3.0 with crate(lazycell/default) < 2.0.0~)",
                "(crate(lazy_static/default) >= 1.4.0 with crate(lazy_static/default) < 2.0.0~)",
                "(crate(libc/default) >= 0.2.85 with crate(libc/default) < 0.3.0~)",
                "(crate(libc/default) >= 0.2.98 with crate(libc/default) < 0.3.0~)",
                "(crate(log/default) >= 0.4.14 with crate(log/default) < 0.5.0~)",
                "(crate(log-panics/default) >= 2.0.0 with crate(log-panics/default) < 3.0.0~)",
                "(crate(maplit/default) >= 1.0.2 with crate(maplit/default) < 2.0.0~)",
                "(crate(markdown/default) >= 0.3.0 with crate(markdown/default) < 0.4.0~)",
                "(crate(mockall/default) >= 0.9.1 with crate(mockall/default) < 0.10.0~)",
                "(crate(named_pipe/default) >= 0.4.1 with crate(named_pipe/default) < 0.5.0~)",
                "(crate(natord/default) >= 1.0.9 with crate(natord/default) < 2.0.0~)",
                "(crate(notify/default) >= 4.0.17 with crate(notify/default) < 5.0.0~)",
                "(crate(notify-rust/default) >= 4.2.2 with crate(notify-rust/default) < 5.0.0~)",
                "(crate(opener/default) >= 0.5.0 with crate(opener/default) < 0.6.0~)",
                "(crate(ordered-float/default) >= 2.0.0 with crate(ordered-float/default) < 3.0.0~)",
                "(crate(path-slash/default) >= 0.1.4 with crate(path-slash/default) < 0.2.0~)",
                "(crate(pretty_assertions/default) >= 0.7.2 with crate(pretty_assertions/default) < 0.8.0~)",
                "(crate(rand/default) >= 0.8.3 with crate(rand/default) < 0.9.0~)",
                "(crate(regex/default) >= 1.5.5 with crate(regex/default) < 2.0.0~)",
                "(crate(reqwest) >= 0.11.4 with crate(reqwest) < 0.12.0~)",
                "(crate(reqwest/blocking) >= 0.11.4 with crate(reqwest/blocking) < 0.12.0~)",
                "(crate(reqwest/default-tls) >= 0.11.4 with crate(reqwest/default-tls) < 0.12.0~)",
                "(crate(scopeguard/default) >= 1.1.0 with crate(scopeguard/default) < 2.0.0~)",
                "(crate(serde/default) >= 1.0.123 with crate(serde/default) < 2.0.0~)",
                "(crate(serde/derive) >= 1.0.123 with crate(serde/derive) < 2.0.0~)",
                "(crate(serde_json/default) >= 1.0.61 with crate(serde_json/default) < 2.0.0~)",
                "(crate(serde_json/default) >= 1.0.62 with crate(serde_json/default) < 2.0.0~)",
                "(crate(serde_yaml/default) >= 0.8.17 with crate(serde_yaml/default) < 0.9.0~)",
                "(crate(sha2/default) >= 0.9.6 with crate(sha2/default) < 0.10.0~)",
                "(crate(simplelog/default) >= 0.9.0 with crate(simplelog/default) < 0.10.0~)",
                "(crate(sys-locale/default) >= 0.1.0 with crate(sys-locale/default) < 0.2.0~)",
                "(crate(sysinfo/default) >= 0.24.5 with crate(sysinfo/default) < 0.25.0~)",
                "(crate(tempdir/default) >= 0.3.7 with crate(tempdir/default) < 0.4.0~)",
                "(crate(tempfile/default) >= 3.2.0 with crate(tempfile/default) < 4.0.0~)",
                "(crate(test-case/default) >= 1.1.0 with crate(test-case/default) < 2.0.0~)",
                "(crate(thiserror/default) >= 1.0.23 with crate(thiserror/default) < 2.0.0~)",
                "(crate(unicase/default) >= 2.6.0 with crate(unicase/default) < 3.0.0~)",
                "(crate(walkdir/default) >= 2.3.1 with crate(walkdir/default) < 3.0.0~)",
                "(crate(widestring/default) >= 0.4.3 with crate(widestring/default) < 0.5.0~)",
                "(crate(winapi/default) >= 0.3.9 with crate(winapi/default) < 0.4.0~)",
                "(crate(winapi/wincon) >= 0.3.9 with crate(winapi/wincon) < 0.4.0~)",
                "(crate(winreg/default) >= 0.9.0 with crate(winreg/default) < 0.10.0~)",
                "(crate(winrt-notification/default) >= 0.3.1 with crate(winrt-notification/default) < 0.4.0~)",
                "(crate(winres/default) >= 0.1.11 with crate(winres/default) < 0.2.0~)",
                "(crate(zip/default) >= 0.5.12 with crate(zip/default) < 0.6.0~)",
                "(crate(zip/default) >= 0.5.13 with crate(zip/default) < 0.6.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "espanso-2.1.8.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.31",
                "(crate(anyhow/default) >= 1.0.38 with crate(anyhow/default) < 2.0.0~)",
                "(crate(caps/default) >= 0.5.2 with crate(caps/default) < 0.6.0~)",
                "(crate(cc/default) >= 1.0.73 with crate(cc/default) < 2.0.0~)",
                "(crate(chrono/default) >= 0.4.19 with crate(chrono/default) < 0.5.0~)",
                "(crate(chrono/unstable-locales) >= 0.4.19 with crate(chrono/unstable-locales) < 0.5.0~)",
                "(crate(clap/default) >= 2.33.3 with crate(clap/default) < 3.0.0~)",
                "(crate(colored/default) >= 2.0.0 with crate(colored/default) < 3.0.0~)",
                "(crate(const_format/default) >= 0.2.14 with crate(const_format/default) < 0.3.0~)",
                "(crate(crossbeam/default) >= 0.8.0 with crate(crossbeam/default) < 0.9.0~)",
                "(crate(dialoguer/default) >= 0.8.0 with crate(dialoguer/default) < 0.9.0~)",
                "(crate(dirs/default) >= 3.0.1 with crate(dirs/default) < 4.0.0~)",
                "(crate(dunce/default) >= 1.0.1 with crate(dunce/default) < 2.0.0~)",
                "(crate(enum-as-inner/default) >= 0.3.3 with crate(enum-as-inner/default) < 0.4.0~)",
                "(crate(fs_extra/default) >= 1.2.0 with crate(fs_extra/default) < 2.0.0~)",
                "(crate(fs2/default) >= 0.4.3 with crate(fs2/default) < 0.5.0~)",
                "(crate(glob/default) >= 0.3.0 with crate(glob/default) < 0.4.0~)",
                "(crate(hex/default) >= 0.4.3 with crate(hex/default) < 0.5.0~)",
                "(crate(html2text/default) >= 0.2.1 with crate(html2text/default) < 0.3.0~)",
                "(crate(indoc/default) >= 1.0.3 with crate(indoc/default) < 2.0.0~)",
                "(crate(itertools/default) >= 0.10.0 with crate(itertools/default) < 0.11.0~)",
                "(crate(lazycell/default) >= 1.3.0 with crate(lazycell/default) < 2.0.0~)",
                "(crate(lazy_static/default) >= 1.4.0 with crate(lazy_static/default) < 2.0.0~)",
                "(crate(libc/default) >= 0.2.85 with crate(libc/default) < 0.3.0~)",
                "(crate(libc/default) >= 0.2.98 with crate(libc/default) < 0.3.0~)",
                "(crate(log/default) >= 0.4.14 with crate(log/default) < 0.5.0~)",
                "(crate(log-panics/default) >= 2.0.0 with crate(log-panics/default) < 3.0.0~)",
                "(crate(maplit/default) >= 1.0.2 with crate(maplit/default) < 2.0.0~)",
                "(crate(markdown/default) >= 0.3.0 with crate(markdown/default) < 0.4.0~)",
                "(crate(named_pipe/default) >= 0.4.1 with crate(named_pipe/default) < 0.5.0~)",
                "(crate(natord/default) >= 1.0.9 with crate(natord/default) < 2.0.0~)",
                "(crate(notify/default) >= 4.0.17 with crate(notify/default) < 5.0.0~)",
                "(crate(notify-rust/default) >= 4.2.2 with crate(notify-rust/default) < 5.0.0~)",
                "(crate(opener/default) >= 0.5.0 with crate(opener/default) < 0.6.0~)",
                "(crate(ordered-float/default) >= 2.0.0 with crate(ordered-float/default) < 3.0.0~)",
                "(crate(path-slash/default) >= 0.1.4 with crate(path-slash/default) < 0.2.0~)",
                "(crate(rand/default) >= 0.8.3 with crate(rand/default) < 0.9.0~)",
                "(crate(regex/default) >= 1.5.5 with crate(regex/default) < 2.0.0~)",
                "(crate(reqwest) >= 0.11.4 with crate(reqwest) < 0.12.0~)",
                "(crate(reqwest/blocking) >= 0.11.4 with crate(reqwest/blocking) < 0.12.0~)",
                "(crate(reqwest/default-tls) >= 0.11.4 with crate(reqwest/default-tls) < 0.12.0~)",
                "(crate(scopeguard/default) >= 1.1.0 with crate(scopeguard/default) < 2.0.0~)",
                "(crate(serde/default) >= 1.0.123 with crate(serde/default) < 2.0.0~)",
                "(crate(serde/derive) >= 1.0.123 with crate(serde/derive) < 2.0.0~)",
                "(crate(serde_json/default) >= 1.0.61 with crate(serde_json/default) < 2.0.0~)",
                "(crate(serde_json/default) >= 1.0.62 with crate(serde_json/default) < 2.0.0~)",
                "(crate(serde_yaml/default) >= 0.8.17 with crate(serde_yaml/default) < 0.9.0~)",
                "(crate(sha2/default) >= 0.9.6 with crate(sha2/default) < 0.10.0~)",
                "(crate(simplelog/default) >= 0.9.0 with crate(simplelog/default) < 0.10.0~)",
                "(crate(sys-locale/default) >= 0.1.0 with crate(sys-locale/default) < 0.2.0~)",
                "(crate(sysinfo/default) >= 0.24.5 with crate(sysinfo/default) < 0.25.0~)",
                "(crate(tempdir/default) >= 0.3.7 with crate(tempdir/default) < 0.4.0~)",
                "(crate(thiserror/default) >= 1.0.23 with crate(thiserror/default) < 2.0.0~)",
                "(crate(unicase/default) >= 2.6.0 with crate(unicase/default) < 3.0.0~)",
                "(crate(walkdir/default) >= 2.3.1 with crate(walkdir/default) < 3.0.0~)",
                "(crate(widestring/default) >= 0.4.3 with crate(widestring/default) < 0.5.0~)",
                "(crate(winapi/default) >= 0.3.9 with crate(winapi/default) < 0.4.0~)",
                "(crate(winapi/wincon) >= 0.3.9 with crate(winapi/wincon) < 0.4.0~)",
                "(crate(winreg/default) >= 0.9.0 with crate(winreg/default) < 0.10.0~)",
                "(crate(winrt-notification/default) >= 0.3.1 with crate(winrt-notification/default) < 0.4.0~)",
                "(crate(winres/default) >= 0.1.11 with crate(winres/default) < 0.2.0~)",
                "(crate(zip/default) >= 0.5.12 with crate(zip/default) < 0.6.0~)",
                "(crate(zip/default) >= 0.5.13 with crate(zip/default) < 0.6.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "fapolicy-analyzer-0.6.8.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.31",
                "(crate(chrono/default) >= 0.4.22 with crate(chrono/default) < 0.5.0~)",
                "(crate(nom/default) >= 7.1.0 with crate(nom/default) < 8.0.0~)",
                "(crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0~)",
                "(crate(serde/derive) >= 1.0.0 with crate(serde/derive) < 2.0.0~)",
                "(crate(thiserror/default) >= 1.0.0 with crate(thiserror/default) < 2.0.0~)",
                "(crate(dbus/default) >= 0.9.0 with crate(dbus/default) < 0.10.0~)",
                "(crate(lmdb/default) >= 0.8.0 with crate(lmdb/default) < 0.9.0~)",
                "(crate(rayon/default) >= 1.5.0 with crate(rayon/default) < 2.0.0~)",
                "(crate(data-encoding/default) >= 2.3.1 with crate(data-encoding/default) < 3.0.0~)",
                "(crate(ring/default) >= 0.16.19 with crate(ring/default) < 0.17.0~)",
                "(crate(tempfile/default) >= 3.3.0 with crate(tempfile/default) < 4.0.0~)",
                "(crate(confy/default) >= 0.4.0 with crate(confy/default) < 0.5.0~)",
                "(crate(directories/default) >= 4.0.0 with crate(directories/default) < 5.0.0~)",
                "(crate(pyo3/default) >= 0.15.0 with crate(pyo3/default) < 0.16.0~)",
                "(crate(pyo3/abi3-py36) >= 0.15.0 with crate(pyo3/abi3-py36) < 0.16.0~)",
                "(crate(similar/default) >= 2.1.0 with crate(similar/default) < 3.0.0~)",
                "(crate(ariadne/default) >= 0.1.0 with crate(ariadne/default) < 0.2.0~)",
                "(crate(clap/default) >= 3.2.20 with crate(clap/default) < 4.0.0~)",
                "(crate(clap/derive) >= 3.2.20 with crate(clap/derive) < 4.0.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "fapolicy-analyzer-0.6.8.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.31",
                "(crate(chrono/default) >= 0.4.22 with crate(chrono/default) < 0.5.0~)",
                "(crate(nom/default) >= 7.1.0 with crate(nom/default) < 8.0.0~)",
                "(crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0~)",
                "(crate(serde/derive) >= 1.0.0 with crate(serde/derive) < 2.0.0~)",
                "(crate(thiserror/default) >= 1.0.0 with crate(thiserror/default) < 2.0.0~)",
                "(crate(dbus/default) >= 0.9.0 with crate(dbus/default) < 0.10.0~)",
                "(crate(lmdb/default) >= 0.8.0 with crate(lmdb/default) < 0.9.0~)",
                "(crate(rayon/default) >= 1.5.0 with crate(rayon/default) < 2.0.0~)",
                "(crate(data-encoding/default) >= 2.3.1 with crate(data-encoding/default) < 3.0.0~)",
                "(crate(ring/default) >= 0.16.19 with crate(ring/default) < 0.17.0~)",
                "(crate(confy/default) >= 0.4.0 with crate(confy/default) < 0.5.0~)",
                "(crate(directories/default) >= 4.0.0 with crate(directories/default) < 5.0.0~)",
                "(crate(pyo3/default) >= 0.15.0 with crate(pyo3/default) < 0.16.0~)",
                "(crate(pyo3/abi3-py36) >= 0.15.0 with crate(pyo3/abi3-py36) < 0.16.0~)",
                "(crate(similar/default) >= 2.1.0 with crate(similar/default) < 3.0.0~)",
                "(crate(ariadne/default) >= 0.1.0 with crate(ariadne/default) < 0.2.0~)",
                "(crate(clap/default) >= 3.2.20 with crate(clap/default) < 4.0.0~)",
                "(crate(clap/derive) >= 3.2.20 with crate(clap/derive) < 4.0.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "libblkio-1.2.2.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.31",
                "(crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0~)",
                "(crate(cc/default) >= 1.0.0 with crate(cc/default) < 2.0.0~)",
                "(crate(bitflags/default) >= 1.2.0 with crate(bitflags/default) < 2.0.0~)",
                "(crate(concat-idents/default) >= 1.1.0 with crate(concat-idents/default) < 2.0.0~)",
                "(crate(const-cstr/default) >= 0.3.0 with crate(const-cstr/default) < 0.4.0~)",
                "(crate(io-uring/default) >= 0.5.10 with crate(io-uring/default) < 0.6.0~)",
                "(crate(lazy_static/default) >= 1.1.0 with crate(lazy_static/default) < 2.0.0~)",
                "(crate(nix) >= 0.24.0 with crate(nix) < 0.25.0~)",
                "(crate(nix/event) >= 0.24.0 with crate(nix/event) < 0.25.0~)",
                "(crate(nix/feature) >= 0.24.0 with crate(nix/feature) < 0.25.0~)",
                "(crate(nix/fs) >= 0.24.0 with crate(nix/fs) < 0.25.0~)",
                "(crate(nix/mman) >= 0.24.0 with crate(nix/mman) < 0.25.0~)",
                "(crate(pci-driver) >= 0.1.2 with crate(pci-driver) < 0.2.0~)",
                "(crate(pci-driver/vfio) >= 0.1.2 with crate(pci-driver/vfio) < 0.2.0~)",
                "(crate(memmap2/default) >= 0.1.0 with crate(memmap2/default) < 0.6.0~)",
                "(crate(virtio-bindings/default) >= 0.1.0 with crate(virtio-bindings/default) < 0.2.0~)",
                "(crate(virtio-bindings/virtio-v5_0_0) >= 0.1.0 with crate(virtio-bindings/virtio-v5_0_0) < 0.2.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "libblkio-1.2.2.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.31",
                "(crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0~)",
                "(crate(cc/default) >= 1.0.0 with crate(cc/default) < 2.0.0~)",
                "(crate(bitflags/default) >= 1.2.0 with crate(bitflags/default) < 2.0.0~)",
                "(crate(concat-idents/default) >= 1.1.0 with crate(concat-idents/default) < 2.0.0~)",
                "(crate(const-cstr/default) >= 0.3.0 with crate(const-cstr/default) < 0.4.0~)",
                "(crate(io-uring/default) >= 0.5.10 with crate(io-uring/default) < 0.6.0~)",
                "(crate(lazy_static/default) >= 1.1.0 with crate(lazy_static/default) < 2.0.0~)",
                "(crate(nix) >= 0.24.0 with crate(nix) < 0.25.0~)",
                "(crate(nix/event) >= 0.24.0 with crate(nix/event) < 0.25.0~)",
                "(crate(nix/feature) >= 0.24.0 with crate(nix/feature) < 0.25.0~)",
                "(crate(nix/fs) >= 0.24.0 with crate(nix/fs) < 0.25.0~)",
                "(crate(nix/mman) >= 0.24.0 with crate(nix/mman) < 0.25.0~)",
                "(crate(pci-driver) >= 0.1.2 with crate(pci-driver) < 0.2.0~)",
                "(crate(pci-driver/vfio) >= 0.1.2 with crate(pci-driver/vfio) < 0.2.0~)",
                "(crate(memmap2/default) >= 0.1.0 with crate(memmap2/default) < 0.6.0~)",
                "(crate(virtio-bindings/default) >= 0.1.0 with crate(virtio-bindings/default) < 0.2.0~)",
                "(crate(virtio-bindings/virtio-v5_0_0) >= 0.1.0 with crate(virtio-bindings/virtio-v5_0_0) < 0.2.0~)",
            },
        ),
        # default features with dev-dependencies
        (
            "zola-0.16.1.json",
            FeatureFlags(),
            True,
            {
                "rust >= 1.31",
                "rust >= 1.56",
                "(crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0~)",
                "(crate(serde/derive) >= 1.0.0 with crate(serde/derive) < 2.0.0~)",
                "(crate(anyhow/default) >= 1.0.56 with crate(anyhow/default) < 2.0.0~)",
                "(crate(ahash/default) >= 0.8.0 with crate(ahash/default) < 0.9.0~)",
                "(crate(ammonia/default) >= 3.0.0 with crate(ammonia/default) < 4.0.0~)",
                "(crate(atty/default) >= 0.2.11 with crate(atty/default) < 0.3.0~)",
                "(crate(base64/default) >= 0.13.0 with crate(base64/default) < 0.14.0~)",
                "(crate(csv/default) >= 1.0.0 with crate(csv/default) < 2.0.0~)",
                "(crate(elasticlunr-rs/default) >= 3.0.0 with crate(elasticlunr-rs/default) < 4.0.0~)",
                "(crate(elasticlunr-rs/da) >= 3.0.0 with crate(elasticlunr-rs/da) < 4.0.0~)",
                "(crate(elasticlunr-rs/no) >= 3.0.0 with crate(elasticlunr-rs/no) < 4.0.0~)",
                "(crate(elasticlunr-rs/de) >= 3.0.0 with crate(elasticlunr-rs/de) < 4.0.0~)",
                "(crate(elasticlunr-rs/du) >= 3.0.0 with crate(elasticlunr-rs/du) < 4.0.0~)",
                "(crate(elasticlunr-rs/es) >= 3.0.0 with crate(elasticlunr-rs/es) < 4.0.0~)",
                "(crate(elasticlunr-rs/fi) >= 3.0.0 with crate(elasticlunr-rs/fi) < 4.0.0~)",
                "(crate(elasticlunr-rs/fr) >= 3.0.0 with crate(elasticlunr-rs/fr) < 4.0.0~)",
                "(crate(elasticlunr-rs/it) >= 3.0.0 with crate(elasticlunr-rs/it) < 4.0.0~)",
                "(crate(elasticlunr-rs/pt) >= 3.0.0 with crate(elasticlunr-rs/pt) < 4.0.0~)",
                "(crate(elasticlunr-rs/ro) >= 3.0.0 with crate(elasticlunr-rs/ro) < 4.0.0~)",
                "(crate(elasticlunr-rs/ru) >= 3.0.0 with crate(elasticlunr-rs/ru) < 4.0.0~)",
                "(crate(elasticlunr-rs/sv) >= 3.0.0 with crate(elasticlunr-rs/sv) < 4.0.0~)",
                "(crate(elasticlunr-rs/tr) >= 3.0.0 with crate(elasticlunr-rs/tr) < 4.0.0~)",
                "(crate(filetime/default) >= 0.2.0 with crate(filetime/default) < 0.3.0~)",
                "(crate(gh-emoji/default) >= 1.0.0 with crate(gh-emoji/default) < 2.0.0~)",
                "(crate(glob/default) >= 0.3.0 with crate(glob/default) < 0.4.0~)",
                "(crate(globset/default) >= 0.4.0 with crate(globset/default) < 0.5.0~)",
                "(crate(image/default) >= 0.24.0 with crate(image/default) < 0.25.0~)",
                "(crate(lexical-sort/default) >= 0.3.0 with crate(lexical-sort/default) < 0.4.0~)",
                "(crate(minify-html/default) >= 0.9.0 with crate(minify-html/default) < 0.10.0~)",
                "(crate(nom-bibtex/default) >= 0.3.0 with crate(nom-bibtex/default) < 0.4.0~)",
                "(crate(num-format/default) >= 0.4.0 with crate(num-format/default) < 0.5.0~)",
                "(crate(once_cell/default) >= 1.0.0 with crate(once_cell/default) < 2.0.0~)",
                "(crate(percent-encoding/default) >= 2.0.0 with crate(percent-encoding/default) < 3.0.0~)",
                "(crate(pulldown-cmark) >= 0.9.0 with crate(pulldown-cmark) < 0.10.0~)",
                "(crate(pulldown-cmark/simd) >= 0.9.0 with crate(pulldown-cmark/simd) < 0.10.0~)",
                "(crate(quickxml_to_serde/default) >= 0.5.0 with crate(quickxml_to_serde/default) < 0.6.0~)",
                "(crate(rayon/default) >= 1.0.0 with crate(rayon/default) < 2.0.0~)",
                "(crate(regex/default) >= 1.0.0 with crate(regex/default) < 2.0.0~)",
                "(crate(relative-path/default) >= 1.0.0 with crate(relative-path/default) < 2.0.0~)",
                "(crate(reqwest) >= 0.11.0 with crate(reqwest) < 0.12.0~)",
                "(crate(reqwest/blocking) >= 0.11.0 with crate(reqwest/blocking) < 0.12.0~)",
                "(crate(reqwest/rustls-tls) >= 0.11.0 with crate(reqwest/rustls-tls) < 0.12.0~)",
                "(crate(sass-rs/default) >= 0.2.0 with crate(sass-rs/default) < 0.3.0~)",
                "(crate(serde_json/default) >= 1.0.0 with crate(serde_json/default) < 2.0.0~)",
                "(crate(serde_yaml/default) >= 0.9.0 with crate(serde_yaml/default) < 0.10.0~)",
                "(crate(sha2/default) >= 0.10.0 with crate(sha2/default) < 0.11.0~)",
                "(crate(slug/default) >= 0.1.0 with crate(slug/default) < 0.2.0~)",
                "(crate(svg_metadata/default) >= 0.4.0 with crate(svg_metadata/default) < 0.5.0~)",
                "(crate(syntect/default) >= 5.0.0 with crate(syntect/default) < 6.0.0~)",
                "(crate(tera/default) >= 1.0.0 with crate(tera/default) < 2.0.0~)",
                "(crate(tera/preserve_order) >= 1.0.0 with crate(tera/preserve_order) < 2.0.0~)",
                "(crate(termcolor/default) >= 1.0.4 with crate(termcolor/default) < 2.0.0~)",
                "(crate(time/default) >= 0.3.0 with crate(time/default) < 0.4.0~)",
                "(crate(time/macros) >= 0.3.0 with crate(time/macros) < 0.4.0~)",
                "(crate(toml/default) >= 0.5.0 with crate(toml/default) < 0.6.0~)",
                "(crate(unic-langid/default) >= 0.9.0 with crate(unic-langid/default) < 0.10.0~)",
                "(crate(unicode-segmentation/default) >= 1.2.0 with crate(unicode-segmentation/default) < 2.0.0~)",
                "(crate(url/default) >= 2.0.0 with crate(url/default) < 3.0.0~)",
                "(crate(walkdir/default) >= 2.0.0 with crate(walkdir/default) < 3.0.0~)",
                "(crate(webp/default) >= 0.2.0 with crate(webp/default) < 0.3.0~)",
                "(crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0~)",
                "(crate(serde/derive) >= 1.0.0 with crate(serde/derive) < 2.0.0~)",
                "(crate(tempfile/default) >= 3.0.0 with crate(tempfile/default) < 4.0.0~)",
                "(crate(tempfile/default) >= 3.3.0 with crate(tempfile/default) < 4.0.0~)",
                "(crate(test-case/default) >= 2.0.0 with crate(test-case/default) < 3.0.0~)",
                "(crate(pest/default) >= 2.0.0 with crate(pest/default) < 3.0.0~)",
                "(crate(pest_derive/default) >= 2.0.0 with crate(pest_derive/default) < 3.0.0~)",
                "(crate(insta/default) >= 1.12.0 with crate(insta/default) < 2.0.0~)",
                "(crate(mockito/default) >= 0.31.0 with crate(mockito/default) < 0.32.0~)",
                "(crate(kamadak-exif/default) >= 0.5.4 with crate(kamadak-exif/default) < 0.6.0~)",
                "(crate(path-slash/default) >= 0.2.0 with crate(path-slash/default) < 0.3.0~)",
                "(crate(clap/default) >= 3.0.0 with crate(clap/default) < 4.0.0~)",
                "(crate(clap/derive) >= 3.0.0 with crate(clap/derive) < 4.0.0~)",
                "(crate(ctrlc/default) >= 3.0.0 with crate(ctrlc/default) < 4.0.0~)",
                "(crate(hyper) >= 0.14.1 with crate(hyper) < 0.15.0~)",
                "(crate(hyper/runtime) >= 0.14.1 with crate(hyper/runtime) < 0.15.0~)",
                "(crate(hyper/server) >= 0.14.1 with crate(hyper/server) < 0.15.0~)",
                "(crate(hyper/http2) >= 0.14.1 with crate(hyper/http2) < 0.15.0~)",
                "(crate(hyper/http1) >= 0.14.1 with crate(hyper/http1) < 0.15.0~)",
                "(crate(mime/default) >= 0.3.16 with crate(mime/default) < 0.4.0~)",
                "(crate(mime_guess/default) >= 2.0.0 with crate(mime_guess/default) < 3.0.0~)",
                "(crate(notify/default) >= 4.0.0 with crate(notify/default) < 5.0.0~)",
                "(crate(open/default) >= 3.0.0 with crate(open/default) < 4.0.0~)",
                "(crate(pathdiff/default) >= 0.2.0 with crate(pathdiff/default) < 0.3.0~)",
                "(crate(time/formatting) >= 0.3.0 with crate(time/formatting) < 0.4.0~)",
                "(crate(time/local-offset) >= 0.3.0 with crate(time/local-offset) < 0.4.0~)",
                "(crate(tokio) >= 1.0.1 with crate(tokio) < 2.0.0~)",
                "(crate(tokio/rt) >= 1.0.1 with crate(tokio/rt) < 2.0.0~)",
                "(crate(tokio/fs) >= 1.0.1 with crate(tokio/fs) < 2.0.0~)",
                "(crate(tokio/time) >= 1.0.1 with crate(tokio/time) < 2.0.0~)",
                "(crate(ws/default) >= 0.9.0 with crate(ws/default) < 0.10.0~)",
                "(crate(same-file/default) >= 1.0.0 with crate(same-file/default) < 2.0.0~)",
                "(crate(clap_complete/default) >= 3.0.0 with crate(clap_complete/default) < 4.0.0~)",
                "(crate(winres/default) >= 0.1.0 with crate(winres/default) < 0.2.0~)",
            },
        ),
        # default features without dev-dependencies
        (
            "zola-0.16.1.json",
            FeatureFlags(),
            False,
            {
                "rust >= 1.31",
                "rust >= 1.56",
                "(crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0~)",
                "(crate(serde/derive) >= 1.0.0 with crate(serde/derive) < 2.0.0~)",
                "(crate(anyhow/default) >= 1.0.56 with crate(anyhow/default) < 2.0.0~)",
                "(crate(ahash/default) >= 0.8.0 with crate(ahash/default) < 0.9.0~)",
                "(crate(ammonia/default) >= 3.0.0 with crate(ammonia/default) < 4.0.0~)",
                "(crate(atty/default) >= 0.2.11 with crate(atty/default) < 0.3.0~)",
                "(crate(base64/default) >= 0.13.0 with crate(base64/default) < 0.14.0~)",
                "(crate(csv/default) >= 1.0.0 with crate(csv/default) < 2.0.0~)",
                "(crate(elasticlunr-rs/default) >= 3.0.0 with crate(elasticlunr-rs/default) < 4.0.0~)",
                "(crate(elasticlunr-rs/da) >= 3.0.0 with crate(elasticlunr-rs/da) < 4.0.0~)",
                "(crate(elasticlunr-rs/no) >= 3.0.0 with crate(elasticlunr-rs/no) < 4.0.0~)",
                "(crate(elasticlunr-rs/de) >= 3.0.0 with crate(elasticlunr-rs/de) < 4.0.0~)",
                "(crate(elasticlunr-rs/du) >= 3.0.0 with crate(elasticlunr-rs/du) < 4.0.0~)",
                "(crate(elasticlunr-rs/es) >= 3.0.0 with crate(elasticlunr-rs/es) < 4.0.0~)",
                "(crate(elasticlunr-rs/fi) >= 3.0.0 with crate(elasticlunr-rs/fi) < 4.0.0~)",
                "(crate(elasticlunr-rs/fr) >= 3.0.0 with crate(elasticlunr-rs/fr) < 4.0.0~)",
                "(crate(elasticlunr-rs/it) >= 3.0.0 with crate(elasticlunr-rs/it) < 4.0.0~)",
                "(crate(elasticlunr-rs/pt) >= 3.0.0 with crate(elasticlunr-rs/pt) < 4.0.0~)",
                "(crate(elasticlunr-rs/ro) >= 3.0.0 with crate(elasticlunr-rs/ro) < 4.0.0~)",
                "(crate(elasticlunr-rs/ru) >= 3.0.0 with crate(elasticlunr-rs/ru) < 4.0.0~)",
                "(crate(elasticlunr-rs/sv) >= 3.0.0 with crate(elasticlunr-rs/sv) < 4.0.0~)",
                "(crate(elasticlunr-rs/tr) >= 3.0.0 with crate(elasticlunr-rs/tr) < 4.0.0~)",
                "(crate(filetime/default) >= 0.2.0 with crate(filetime/default) < 0.3.0~)",
                "(crate(gh-emoji/default) >= 1.0.0 with crate(gh-emoji/default) < 2.0.0~)",
                "(crate(glob/default) >= 0.3.0 with crate(glob/default) < 0.4.0~)",
                "(crate(globset/default) >= 0.4.0 with crate(globset/default) < 0.5.0~)",
                "(crate(image/default) >= 0.24.0 with crate(image/default) < 0.25.0~)",
                "(crate(lexical-sort/default) >= 0.3.0 with crate(lexical-sort/default) < 0.4.0~)",
                "(crate(minify-html/default) >= 0.9.0 with crate(minify-html/default) < 0.10.0~)",
                "(crate(nom-bibtex/default) >= 0.3.0 with crate(nom-bibtex/default) < 0.4.0~)",
                "(crate(num-format/default) >= 0.4.0 with crate(num-format/default) < 0.5.0~)",
                "(crate(once_cell/default) >= 1.0.0 with crate(once_cell/default) < 2.0.0~)",
                "(crate(percent-encoding/default) >= 2.0.0 with crate(percent-encoding/default) < 3.0.0~)",
                "(crate(pulldown-cmark) >= 0.9.0 with crate(pulldown-cmark) < 0.10.0~)",
                "(crate(pulldown-cmark/simd) >= 0.9.0 with crate(pulldown-cmark/simd) < 0.10.0~)",
                "(crate(quickxml_to_serde/default) >= 0.5.0 with crate(quickxml_to_serde/default) < 0.6.0~)",
                "(crate(rayon/default) >= 1.0.0 with crate(rayon/default) < 2.0.0~)",
                "(crate(regex/default) >= 1.0.0 with crate(regex/default) < 2.0.0~)",
                "(crate(relative-path/default) >= 1.0.0 with crate(relative-path/default) < 2.0.0~)",
                "(crate(reqwest) >= 0.11.0 with crate(reqwest) < 0.12.0~)",
                "(crate(reqwest/blocking) >= 0.11.0 with crate(reqwest/blocking) < 0.12.0~)",
                "(crate(reqwest/rustls-tls) >= 0.11.0 with crate(reqwest/rustls-tls) < 0.12.0~)",
                "(crate(sass-rs/default) >= 0.2.0 with crate(sass-rs/default) < 0.3.0~)",
                "(crate(serde_json/default) >= 1.0.0 with crate(serde_json/default) < 2.0.0~)",
                "(crate(serde_yaml/default) >= 0.9.0 with crate(serde_yaml/default) < 0.10.0~)",
                "(crate(sha2/default) >= 0.10.0 with crate(sha2/default) < 0.11.0~)",
                "(crate(slug/default) >= 0.1.0 with crate(slug/default) < 0.2.0~)",
                "(crate(svg_metadata/default) >= 0.4.0 with crate(svg_metadata/default) < 0.5.0~)",
                "(crate(syntect/default) >= 5.0.0 with crate(syntect/default) < 6.0.0~)",
                "(crate(tera/default) >= 1.0.0 with crate(tera/default) < 2.0.0~)",
                "(crate(tera/preserve_order) >= 1.0.0 with crate(tera/preserve_order) < 2.0.0~)",
                "(crate(termcolor/default) >= 1.0.4 with crate(termcolor/default) < 2.0.0~)",
                "(crate(time/default) >= 0.3.0 with crate(time/default) < 0.4.0~)",
                "(crate(time/macros) >= 0.3.0 with crate(time/macros) < 0.4.0~)",
                "(crate(toml/default) >= 0.5.0 with crate(toml/default) < 0.6.0~)",
                "(crate(unic-langid/default) >= 0.9.0 with crate(unic-langid/default) < 0.10.0~)",
                "(crate(unicode-segmentation/default) >= 1.2.0 with crate(unicode-segmentation/default) < 2.0.0~)",
                "(crate(url/default) >= 2.0.0 with crate(url/default) < 3.0.0~)",
                "(crate(walkdir/default) >= 2.0.0 with crate(walkdir/default) < 3.0.0~)",
                "(crate(webp/default) >= 0.2.0 with crate(webp/default) < 0.3.0~)",
                "(crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0~)",
                "(crate(serde/derive) >= 1.0.0 with crate(serde/derive) < 2.0.0~)",
                "(crate(pest/default) >= 2.0.0 with crate(pest/default) < 3.0.0~)",
                "(crate(pest_derive/default) >= 2.0.0 with crate(pest_derive/default) < 3.0.0~)",
                "(crate(kamadak-exif/default) >= 0.5.4 with crate(kamadak-exif/default) < 0.6.0~)",
                "(crate(clap/default) >= 3.0.0 with crate(clap/default) < 4.0.0~)",
                "(crate(clap/derive) >= 3.0.0 with crate(clap/derive) < 4.0.0~)",
                "(crate(ctrlc/default) >= 3.0.0 with crate(ctrlc/default) < 4.0.0~)",
                "(crate(hyper) >= 0.14.1 with crate(hyper) < 0.15.0~)",
                "(crate(hyper/runtime) >= 0.14.1 with crate(hyper/runtime) < 0.15.0~)",
                "(crate(hyper/server) >= 0.14.1 with crate(hyper/server) < 0.15.0~)",
                "(crate(hyper/http2) >= 0.14.1 with crate(hyper/http2) < 0.15.0~)",
                "(crate(hyper/http1) >= 0.14.1 with crate(hyper/http1) < 0.15.0~)",
                "(crate(mime/default) >= 0.3.16 with crate(mime/default) < 0.4.0~)",
                "(crate(mime_guess/default) >= 2.0.0 with crate(mime_guess/default) < 3.0.0~)",
                "(crate(notify/default) >= 4.0.0 with crate(notify/default) < 5.0.0~)",
                "(crate(open/default) >= 3.0.0 with crate(open/default) < 4.0.0~)",
                "(crate(pathdiff/default) >= 0.2.0 with crate(pathdiff/default) < 0.3.0~)",
                "(crate(time/formatting) >= 0.3.0 with crate(time/formatting) < 0.4.0~)",
                "(crate(time/local-offset) >= 0.3.0 with crate(time/local-offset) < 0.4.0~)",
                "(crate(tokio) >= 1.0.1 with crate(tokio) < 2.0.0~)",
                "(crate(tokio/rt) >= 1.0.1 with crate(tokio/rt) < 2.0.0~)",
                "(crate(tokio/fs) >= 1.0.1 with crate(tokio/fs) < 2.0.0~)",
                "(crate(tokio/time) >= 1.0.1 with crate(tokio/time) < 2.0.0~)",
                "(crate(ws/default) >= 0.9.0 with crate(ws/default) < 0.10.0~)",
                "(crate(clap_complete/default) >= 3.0.0 with crate(clap_complete/default) < 4.0.0~)",
                "(crate(winres/default) >= 0.1.0 with crate(winres/default) < 0.2.0~)",
            },
        ),
    ],
    ids=short_repr,
)
def test_rpm_workspace_buildrequires(filename: str, flags: FeatureFlags, with_dev_deps: bool, expected: set[str]):
    metadata = load_metadata_from_resource(filename)
    assert workspace_buildrequires(metadata, flags, with_dev_deps) == expected
