We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a551c69 commit 3d88367Copy full SHA for 3d88367
i18n-helpers/src/bin/mdbook-xgettext.rs
@@ -280,4 +280,29 @@ mod tests {
280
281
Ok(())
282
}
283
+
284
+ #[test]
285
+ fn test_create_catalog_duplicates() -> anyhow::Result<()> {
286
+ let (ctx, _tmp) = create_render_context(&[
287
+ ("book.toml", "[book]"),
288
+ ("src/SUMMARY.md", "- [Foo](foo.md)"),
289
+ (
290
+ "src/foo.md",
291
+ "# Foo\n\
292
+ \n\
293
+ Foo\n",
294
+ ),
295
+ ])?;
296
297
+ let catalog = create_catalog(&ctx)?;
298
+ assert_eq!(
299
+ catalog
300
+ .messages()
301
+ .map(|msg| (msg.source(), msg.msgid()))
302
+ .collect::<Vec<_>>(),
303
+ &[("src/SUMMARY.md:1 src/foo.md:1 src/foo.md:3", "Foo"),]
304
+ );
305
306
+ Ok(())
307
+ }
308
0 commit comments