Unit test: highlight.002

This is a test for embellishments to verbatim environments.

A programlisting:

1 |import sys
  | 
  |if len(sys.argv) == 1:
  |    print("Hello, world.")
5 |else:
  |    print(f"Hello, {sys.argv[1]}.")

Unnumbered:

import sys
 
if len(sys.argv) == 1:
    print("Hello, world.")
else:
    print(f"Hello, {sys.argv[1]}.")

A programlistingco:

 1 |The first line                                             ①
   |The second line              ②
   |The third line               ③
   |The fourth line              ③
 5 |The fifth line                                             ④
   |The sixth line                                             ⑤
   |The seventh line
   |The eighth line                                            ⑥
   |The ninth line                                             
10 |The tenth line
   | 
   |⑦
①

The first line.

The second line.

③

The third and fourth lines, together.

④⑤

The fifth and sixth lines, separately.

⑥

The eight and ninth lines as a range.

⑦

The twelfth line.

A programlistingco with syntax highlighting:

1 |import sys                                                 ①
  | 
  |if len(sys.argv) == 1:
  |    print("Hello, world.")             ②
5 |else:
  |    print(f"Hello, {sys.argv[1]}.")    ②
①

An import statment.

②

Print statements.

A screen:

❯ ls -l src/test/resources/xml/l*.xml
-rw-r--r--@ 1 ndw  staff   1.5K Oct 21 09:53 src/test/resources/xml/l10n.001.xml
-rw-r--r--@ 1 ndw  staff   1.5K Oct 21 09:53 src/test/resources/xml/l10n.002.xml
-rw-r--r--@ 1 ndw  staff   1.5K Oct 21 09:53 src/test/resources/xml/l10n.003.xml
-rw-r--r--@ 1 ndw  staff   1.3K Oct 21 09:53 src/test/resources/xml/legalnotice.001.xml
-rw-r--r--@ 1 ndw  staff   410B Oct 21 09:53 src/test/resources/xml/lineannotation.001.xml
-rw-r--r--@ 1 ndw  staff   1.1K Oct 21 09:53 src/test/resources/xml/link.001.xml
-rw-r--r--@ 1 ndw  staff   400B Oct 21 09:53 src/test/resources/xml/link.002.xml
-rw-r--r--@ 1 ndw  staff   885B Oct 21 09:53 src/test/resources/xml/link.003.xml
-rw-r--r--@ 1 ndw  staff   369B Oct 21 09:53 src/test/resources/xml/link.004.xml
-rw-r--r--@ 1 ndw  staff   334B Oct 21 09:53 src/test/resources/xml/literallayout.001.xml
-rw-r--r--@ 1 ndw  staff   545B Oct 21 09:53 src/test/resources/xml/literallayout.002.xml
-rw-r--r--@ 1 ndw  staff   542B Oct 21 09:53 src/test/resources/xml/literallayout.003.xml
-rw-r--r--@ 1 ndw  staff   767B Oct 21 09:53 src/test/resources/xml/literallayout.004.xml
-rw-r--r--@ 1 ndw  staff   928B Oct 21 09:53 src/test/resources/xml/literallayout.005.xml
-rw-r--r--@ 1 ndw  staff   514B Oct 21 09:53 src/test/resources/xml/local.001.xml

A literallayout:

This is a test.
This is only a test.
Had this been a real emergency,
we would have fled in terror and
you would not have been informed.

An address:

Apt 56B
Whitehaven Mansions
Sandhurst Square
London