lib/test-runcmd: Enumerate the anomaly testcases

It's silly not to, since searching for the right C representation
of a shell-escaped string is just retardedly annoying.

Signed-off-by: Andreas Ericsson <ae@op5.se>
lib/runcmd: Handle escaped glyphs in double-quoted strings properly

Previously, an argument such as "\\Key\Lalafoo\\Value" would get
translated to "\KeyLalafoo\Value", which is not how the shell does
it.

With this patch we get the properly escaped string \Key\Lalafoo\Value,
which is the same as /bin/echo produces with the above quoting, and
is what Nagios 3 used to execute when given such a string.

Signed-off-by: Andreas Ericsson <ae@op5.se>
lib/runcmd: Grok escaped shell variables inside double-quoted strings

Previously we'd raise a flag for this (or perhaps that was just
because the latest patch), but with this addendum we handle it
properly once again.

While at it, we add a test-case for it to make sure we avoid
regressions.

Signed-off-by: Andreas Ericsson <ae@op5.se>