summaryrefslogtreecommitdiffstats
path: root/tests/run-make-fulldeps/rustdoc-map-file
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
commit1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch)
tree3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /tests/run-make-fulldeps/rustdoc-map-file
parentReleasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz
rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make-fulldeps/rustdoc-map-file')
-rw-r--r--tests/run-make-fulldeps/rustdoc-map-file/Makefile5
-rw-r--r--tests/run-make-fulldeps/rustdoc-map-file/expected.json5
-rw-r--r--tests/run-make-fulldeps/rustdoc-map-file/foo.rs16
-rwxr-xr-xtests/run-make-fulldeps/rustdoc-map-file/validate_json.py41
4 files changed, 0 insertions, 67 deletions
diff --git a/tests/run-make-fulldeps/rustdoc-map-file/Makefile b/tests/run-make-fulldeps/rustdoc-map-file/Makefile
deleted file mode 100644
index 5cbf7747a..000000000
--- a/tests/run-make-fulldeps/rustdoc-map-file/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-include ../tools.mk
-
-all:
- $(RUSTDOC) -Z unstable-options --generate-redirect-map foo.rs -o "$(TMPDIR)/out"
- "$(PYTHON)" validate_json.py "$(TMPDIR)/out"
diff --git a/tests/run-make-fulldeps/rustdoc-map-file/expected.json b/tests/run-make-fulldeps/rustdoc-map-file/expected.json
deleted file mode 100644
index 6b1ccbeac..000000000
--- a/tests/run-make-fulldeps/rustdoc-map-file/expected.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "foo/macro.foo!.html": "foo/macro.foo.html",
- "foo/private/struct.Quz.html": "foo/struct.Quz.html",
- "foo/hidden/struct.Bar.html": "foo/struct.Bar.html"
-}
diff --git a/tests/run-make-fulldeps/rustdoc-map-file/foo.rs b/tests/run-make-fulldeps/rustdoc-map-file/foo.rs
deleted file mode 100644
index e12b9d229..000000000
--- a/tests/run-make-fulldeps/rustdoc-map-file/foo.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-pub use private::Quz;
-pub use hidden::Bar;
-
-mod private {
- pub struct Quz;
-}
-
-#[doc(hidden)]
-pub mod hidden {
- pub struct Bar;
-}
-
-#[macro_export]
-macro_rules! foo {
- () => {}
-}
diff --git a/tests/run-make-fulldeps/rustdoc-map-file/validate_json.py b/tests/run-make-fulldeps/rustdoc-map-file/validate_json.py
deleted file mode 100755
index 5c14c90b7..000000000
--- a/tests/run-make-fulldeps/rustdoc-map-file/validate_json.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-import json
-
-
-def find_redirect_map_file(folder, errors):
- for root, dirs, files in os.walk(folder):
- for name in files:
- if not name.endswith("redirect-map.json"):
- continue
- with open(os.path.join(root, name)) as f:
- data = json.load(f)
- with open("expected.json") as f:
- expected = json.load(f)
- for key in expected:
- if expected[key] != data.get(key):
- errors.append("Expected `{}` for key `{}`, found: `{}`".format(
- expected[key], key, data.get(key)))
- else:
- del data[key]
- for key in data:
- errors.append("Extra data not expected: key: `{}`, data: `{}`".format(
- key, data[key]))
- return True
- return False
-
-
-if len(sys.argv) != 2:
- print("Expected doc directory to check!")
- sys.exit(1)
-
-errors = []
-if not find_redirect_map_file(sys.argv[1], errors):
- print("Didn't find the map file in `{}`...".format(sys.argv[1]))
- sys.exit(1)
-for err in errors:
- print("=> {}".format(err))
-if len(errors) != 0:
- sys.exit(1)