summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'unittests')
-rw-r--r--unittests/cargotests.py6
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')