Unit test: programlisting.013
These verbatim listings explicitly use the ‘table’ style.
ProgramListing: This is a test
Only a test.
Had this been a real emegency,
We would have fled in terror
And you would not have been informed.
A program listing for the language “python” (explicitly).
def _check_arg(self, arg):
if ":" in arg:
pos = arg.index(":")
name = arg[0:pos]
value = arg[(pos + 1):]
if name in ("-x", "-y", "-r", "-init"):
raise JavaClassRunnerException(
f"The {arg} option cannot be specified")
if name == "-catalog":
self.catalogs.append(value)
return
elif name == "-xsl":
self.stylesheet = arg
self._app_args.append(arg)
A program listing for the language “xml”
]]>