From ee25f4da2796ec8ec02fb0db3892e39a810bb32b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20de=20Vill=C3=A8le?= <25150288+Thibaulltt@users.noreply.github.com> Date: Wed, 29 Oct 2025 15:20:02 +0100 Subject: [PATCH] tests(glossaries): add simple test for custom cmds --- crates/completion/src/tests.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/crates/completion/src/tests.rs b/crates/completion/src/tests.rs index 8c68b71d..2d62ee31 100644 --- a/crates/completion/src/tests.rs +++ b/crates/completion/src/tests.rs @@ -2341,3 +2341,31 @@ fn test_custom_label_multiple_prefix_ref() { "#]], ); } + +#[test] +fn test_custom_glossary_reference_command() { + let mut config = SyntaxConfig::default(); + config.glossary_reference_commands.insert("glsed".to_string()); + + check_with_syntax_config( + config, + r#" +%! main.tex +\newglossaryentry{foo}{ + name={Foo Bar Baz}, + description={The trio of default variable names.} +} + +\glsed{} + |"#, + expect![[r#" + [ + GlossaryEntry( + GlossaryEntryData { + name: "foo", + }, + ), + ] + "#]], + ); +}