blob: 21c787dfda614f0ed04a784b259e1201403dbb0f [file] [log] [blame]
# BUILD file for unicode_test
load(":unicode_test.bzl", "run_executable_rule", "write_file_rule")
# In Russian and Bengali: "Down with mojibake! We want unicode!"
non_ascii_string = "Долой кракозябры! আমরা ইউনিকোড চাই!"
genrule(
name = "genrule_cmd",
cmd = "echo -n \"%s\" > \"$@\"" % non_ascii_string,
outs = ["genrule_cmd.out"],
)
write_file_rule(
name = "shell_echo",
content = """#!/bin/bash
outfile=$1; shift
exec echo -n $@ > $outfile""",
out = "shell_echo.sh",
is_executable = True,
)
run_executable_rule(
name = "action_run_argument",
executable = "shell_echo.sh",
extra_arguments = [non_ascii_string],
out = "action_run_argument.out",
)
write_file_rule(
name = "action_write_content",
content = non_ascii_string,
out = "action_write_content.out",
)