test: add missing implementation-plan test targets
This commit is contained in:
@@ -24,3 +24,22 @@ sh_test(
|
||||
args = ["$(location :hello_ts_bin)", "hello-ts"],
|
||||
data = [":hello_ts_bin"],
|
||||
)
|
||||
|
||||
bun_binary(
|
||||
name = "hello_js_with_data_bin",
|
||||
entry_point = "hello.js",
|
||||
data = ["payload.txt"],
|
||||
)
|
||||
|
||||
sh_test(
|
||||
name = "bun_binary_data_test",
|
||||
srcs = ["verify_data_shape.sh"],
|
||||
args = [
|
||||
"$(location //internal:bun_binary.bzl)",
|
||||
"$(location //tests/binary_test:BUILD.bazel)",
|
||||
],
|
||||
data = [
|
||||
"//internal:bun_binary.bzl",
|
||||
"//tests/binary_test:BUILD.bazel",
|
||||
],
|
||||
)
|
||||
|
||||
1
tests/binary_test/payload.txt
Normal file
1
tests/binary_test/payload.txt
Normal file
@@ -0,0 +1 @@
|
||||
hello-from-data
|
||||
9
tests/binary_test/verify_data_shape.sh
Executable file
9
tests/binary_test/verify_data_shape.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
rule_file="$1"
|
||||
build_file="$2"
|
||||
|
||||
grep -Eq 'files = \[bun_bin, entry_point\] \+ ctx\.files\.data' "${rule_file}"
|
||||
grep -Eq 'name = "hello_js_with_data_bin"' "${build_file}"
|
||||
grep -Eq 'data = \["payload\.txt"\]' "${build_file}"
|
||||
Reference in New Issue
Block a user