Integration tests run with bash, dash, and whatever's installed as `sh`, to ensure compatibility with a wide range of systems.
This commit changed the way that dash escapes special characters, which broke the integration tests:
https://git.kernel.org/pub/scm/utils/dash/dash.git/commit/?id=6900ff60ef7347a8c1445853a8f4689808e0976e
This commit modifies our tests to be compatible with dash before and after the changes, and should fix the Travis build.
The invalid escape sequence error message is delimited with backticks
and isn't used as input to other programs. This diff tweaks the escaping rules
slightly when printing invalid escape sequences. In particular, `, \, ',
and " are now not be escaped.
`env_var(key)` looks up the value of the environment variable with name `key`, aborting execution if it is not found.
`env_var_or_default(key, default)` looks up the value of the environment variable with name `key`, returning `default` if it is not found.