package: reject duplicate manifest names
This commit is contained in:
@@ -147,6 +147,15 @@ def main():
|
||||
fail(f"Package manifest source diagnostic was unclear:\n{out}")
|
||||
manifest_path.write_text(manifest, encoding="utf-8")
|
||||
|
||||
duplicate_name_manifest = manifest + "name: other-tools\n"
|
||||
manifest_path.write_text(duplicate_name_manifest, encoding="utf-8")
|
||||
rc, out = run([str(EXE), "package", "doctor"], work)
|
||||
if rc == 0:
|
||||
fail("package doctor must reject duplicate package manifest names")
|
||||
if "BAD package manifest name: math-tools" not in out:
|
||||
fail(f"Package duplicate manifest-name diagnostic was unclear:\n{out}")
|
||||
manifest_path.write_text(manifest, encoding="utf-8")
|
||||
|
||||
rc, out = run([str(EXE), "package", "doctor"], work)
|
||||
if rc != 0:
|
||||
fail(out)
|
||||
|
||||
Reference in New Issue
Block a user