]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/url_parts_builder/tests.rs
Rollup merge of #92021 - woodenarrow:br_single_fp_element, r=Mark-Simulacrum
[rust.git] / src / librustdoc / html / url_parts_builder / tests.rs
index 43338c95010a0cb01538d4d7161d4d6cf2e23df7..636e1ab55279f995644b8f49e619503eb8218c3e 100644 (file)
@@ -40,6 +40,16 @@ fn push_front_non_empty() {
     t(builder, "nightly/core/str/struct.Bytes.html");
 }
 
+#[test]
+fn push_fmt() {
+    let mut builder = UrlPartsBuilder::new();
+    builder.push_fmt(format_args!("{}", "core"));
+    builder.push("str");
+    builder.push_front("nightly");
+    builder.push_fmt(format_args!("{}.{}.html", "struct", "Bytes"));
+    t(builder, "nightly/core/str/struct.Bytes.html");
+}
+
 #[test]
 fn collect() {
     t(["core", "str"].into_iter().collect(), "core/str");