diff options
author | Samuel Freilich <sfreilich@google.com> | 2021-10-04 12:03:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 12:03:48 -0400 |
commit | 506c17293ef4043c68f8cb0ba5fa05d758e1231a (patch) | |
tree | e2e9bd8bb1ed5d06437903e4bb9823cc749343d5 /toolchains | |
parent | b2ed61686ebca2a44d44857fef5b3e1d31cc2483 (diff) | |
download | bazel-skylib-506c17293ef4043c68f8cb0ba5fa05d758e1231a.tar.gz |
Improve escaping in unittest failure message (#320)
Diffstat (limited to 'toolchains')
-rw-r--r-- | toolchains/unittest/BUILD | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toolchains/unittest/BUILD b/toolchains/unittest/BUILD index 03ceff4..dd23962 100644 --- a/toolchains/unittest/BUILD +++ b/toolchains/unittest/BUILD @@ -9,6 +9,7 @@ toolchain_type( unittest_toolchain( name = "cmd", + escape_chars_with = {"%": "%"}, failure_templ = """@echo off echo %s exit /b 1 @@ -30,14 +31,13 @@ toolchain( unittest_toolchain( name = "bash", + escape_other_chars_with = "\\", failure_templ = """#!/bin/sh -cat <<'EOF' -%s -EOF +echo %s exit 1 """, file_ext = ".sh", - join_on = "\n", + join_on = "\necho ", success_templ = "#!/bin/sh\nexit 0", visibility = ["//visibility:public"], ) |