ddn.data.xml.testing.cli

Package-private: helpers for invoking xmllint / xmlcatalog in tests.

This module is intended for use by unittests within ddn.data.xml.

Types 1

structCliResult

Result of running a CLI tool.

Fields
int exitCodeExit status code returned by the process.
string stdoutCaptured standard output.
string stderrCaptured standard error.

Functions 13

private fnstring readAll(File file)
private fnCliResult runProcess(const string[] argv, const string input = "")
private fnCliResult runProcessBytes(const string[] argv, const(ubyte)[] input)
private fnvoid requireTool(const string tool, const string[] versionArgs)
fnvoid requireXmllint()Requires the `xmllint` tool to be available.
fnvoid requireXmlcatalog()Requires the `xmlcatalog` tool to be available.
fnCliResult runXmllint(const string[] args, const string input = "")Runs `xmllint` and returns its exit code and captured output.
fnCliResult runXmllintBytes(const string[] args, const(ubyte)[] input)Runs `xmllint` with binary standard input.
fnCliResult runXmlcatalog(const string[] args, const string input = "")Runs `xmlcatalog`.
fnstring xmlcatalogResolve(string catalogFile, string entity)Resolves an entity using `xmlcatalog`.
fnstring xmllintC14n(string xml)Runs `xmllint --c14n` on an XML document provided via standard input.
fnstring xmllintC14n11(string xml)Runs `xmllint --c14n11` on an XML document provided via standard input.
fnstring xmllintC14nWithComments(string xml)Runs `xmllint --c14n --with-comments` on an XML document provided via standard input.