diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-10-23 19:15:31 +0200 |
|---|---|---|
| committer | Xavier Claessens <xclaesse@gmail.com> | 2025-10-23 18:29:30 +0100 |
| commit | d87fd34c68c441ecf04eb2ff4bd4857406c268e9 (patch) | |
| tree | 6a3f0a0faa02f02080571bde81a59c3199505d83 /unittests/cargotests.py | |
| parent | c63cfd95b3b93a25f1c8ac490603c37124ba20f0 (diff) | |
| download | meson-d87fd34c68c441ecf04eb2ff4bd4857406c268e9.tar.gz | |
cargo: fix proc-macro=true without crate_type
The default value is not passed further through the converter,
therefore it must take proc-macro into account.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'unittests/cargotests.py')
| -rw-r--r-- | unittests/cargotests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/cargotests.py b/unittests/cargotests.py index 16bc4cfee..643ceceb4 100644 --- a/unittests/cargotests.py +++ b/unittests/cargotests.py @@ -499,6 +499,12 @@ class CargoTomlTest(unittest.TestCase): self.assertEqual(manifest.lib.crate_type, ['proc-macro']) self.assertEqual(manifest.lib.path, 'src/lib.rs') + del manifest_toml['lib']['crate-type'] + manifest = Manifest.from_raw(manifest_toml, 'Cargo.toml') + self.assertEqual(manifest.lib.name, 'bits') + self.assertEqual(manifest.lib.crate_type, ['proc-macro']) + self.assertEqual(manifest.lib.path, 'src/lib.rs') + def test_cargo_toml_targets(self) -> None: with tempfile.TemporaryDirectory() as tmpdir: fname = os.path.join(tmpdir, 'Cargo.toml') |
