diff options
author | Norbert Preining <norbert@preining.info> | 2024-03-25 03:03:04 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-03-25 03:03:04 +0000 |
commit | 05f8146ef2eea2cd71b9c96583c6d893e6c76af5 (patch) | |
tree | 615019c00dc1d5e6ec2636bbbb30852f241c04ee /support/texlab/crates/hover | |
parent | 1feacf4295bab2d8f05aa0f5fbd1d902559bef36 (diff) |
CTAN sync 202403250302
Diffstat (limited to 'support/texlab/crates/hover')
-rw-r--r-- | support/texlab/crates/hover/src/tests.rs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/support/texlab/crates/hover/src/tests.rs b/support/texlab/crates/hover/src/tests.rs index e6377bb034..4473982645 100644 --- a/support/texlab/crates/hover/src/tests.rs +++ b/support/texlab/crates/hover/src/tests.rs @@ -318,3 +318,37 @@ fn test_latex_label_theorem_child_file_mumber() { "#]], ); } + +#[test] +fn test_latex_label_ntheorem() { + check( + r#" +%! main.tex +\newtheorem{theorem}[theoremcounter]{Theorem} +\begin{theorem}% +\label{thm:test} +\end{theorem} +\ref{thm:test} + | + ^^^^^^^^ + +%! main.aux +\newlabel{thm:test}{{1.{1}}{1}}"#, + expect![[r#" + Some( + Label( + RenderedLabel { + range: 46..93, + number: Some( + "1.1", + ), + object: Theorem { + kind: "Theorem", + description: None, + }, + }, + ), + ) + "#]], + ); +} |