aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/shell')
-rwxr-xr-xsrc/test/shell/bazel/bazel_rules_test.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/shell/bazel/bazel_rules_test.sh b/src/test/shell/bazel/bazel_rules_test.sh
index bb3768685b..6b7c04ed1d 100755
--- a/src/test/shell/bazel/bazel_rules_test.sh
+++ b/src/test/shell/bazel/bazel_rules_test.sh
@@ -384,4 +384,20 @@ EOF
bazel build //a:a || fail "build failed"
}
+function test_visibility() {
+ mkdir visibility
+ cat > visibility/BUILD <<EOF
+cc_library(
+ name = "foo",
+ visibility = [
+ "//foo/bar:__pkg__",
+ "//visibility:public",
+ ],
+)
+EOF
+
+ bazel build //visibility:foo &> $TEST_log && fail "Expected failure" || true
+ expect_log "Public or private visibility labels (e.g. //visibility:public or //visibility:private) cannot be used in combination with other labels"
+}
+
run_suite "rules test"