bazel-lib/lib/tests/write_source_files/BUILD.bazel

38 lines
811 B
Python
Raw Normal View History

2022-01-28 02:15:28 +00:00
load("//lib/tests/write_source_files:write_source_files_test.bzl", "write_source_files_test")
load("//lib:write_source_files.bzl", "write_source_files")
genrule(
name = "a-desired",
outs = ["a-desired.js"],
cmd = "echo 'console.log(\"a*\")' > $@",
)
genrule(
name = "b-desired",
outs = ["b-desired.js"],
cmd = "echo 'console.log(\"b*\")' > $@",
)
write_source_files_test(
name = "write_to_source_files_test",
in_files = [
":a-desired",
":b-desired",
],
out_files = [
"a.js",
"b.js",
],
)
write_source_files(
name = "macro_smoke_test",
files = {
"a2.js": ":a-desired",
"b2.js": ":b-desired",
},
additional_update_targets = [
"//lib/tests/write_source_files/subdir:macro_smoke_test",
],
)