Add tests for names and references in src and example blocks.

This commit is contained in:
Tom Alexander 2023-10-04 19:34:10 -04:00
parent 87ac18e6b2
commit 258e9485de
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
5 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,4 @@
#+NAME: foo
#+begin_example text
bar
#+end_example

View File

@ -0,0 +1,6 @@
#+begin_example text
foo
bar (ref:here)
baz
#+end_example
Link to the reference: [[(here)]]

View File

@ -0,0 +1,4 @@
#+NAME: foo
#+begin_src text
bar
#+end_src

View File

@ -0,0 +1,6 @@
#+begin_src text
foo
bar (ref:here)
baz
#+end_src
Link to the reference: [[(here)]]

View File

@ -1549,6 +1549,8 @@ fn compare_example_block<'b, 's>(
let mut this_status = DiffStatus::Good;
let mut message = None;
// TODO: Compare :name
// Compare value
let contents = get_property_quoted_string(emacs, ":value")?.unwrap_or(String::new());
if contents != rust.contents {