Skip to content

Commit 3beb132

Browse files
committed
Add broken test
1 parent 0f8735c commit 3beb132

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

test/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ test_suite(
1515
"//test/internal/targets",
1616
"//test/internal/xcode_schemes",
1717
"//test/internal/xcschemes",
18+
"//test/internal/xcodeproj_extra_files",
1819
],
1920
)
2021

@@ -32,6 +33,7 @@ bzl_library(
3233
"//test/internal/targets:bzls",
3334
"//test/internal/xcode_schemes:bzls",
3435
"//test/internal/xcschemes:bzls",
36+
"//test/internal/xcodeproj_extra_files:bzls",
3537
],
3638
)
3739

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
2+
load(":xcodeproj_extra_files_tests.bzl", "xcodeproj_extra_files_test_suite")
3+
4+
xcodeproj_extra_files_test_suite(name = "xcodeproj_extra_files_test")
5+
6+
test_suite(name = "xcodeproj_extra_files")
7+
8+
bzl_library(
9+
name = "bzls",
10+
srcs = glob(
11+
["*.bzl"],
12+
exclude = ["utils.bzl"],
13+
),
14+
visibility = ["//test:__pkg__"],
15+
)
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
load("@bazel_skylib//lib:unittest.bzl", "asserts", "analysistest")
2+
load("//xcodeproj:xcodeproj_extra_files.bzl", "xcodeproj_extra_files", "XcodeProjExtraFilesHintInfo")
3+
4+
def _provider_contents_test_impl(ctx):
5+
env = analysistest.begin(ctx)
6+
7+
target_under_test = analysistest.target_under_test(env)
8+
9+
asserts.equals(env, depset(["BUILD"]), target_under_test[XcodeProjExtraFilesHintInfo].files)
10+
11+
return analysistest.end(env)
12+
13+
provider_contents_test = analysistest.make(_provider_contents_test_impl)
14+
15+
def _test_provider_contents():
16+
xcodeproj_extra_files(
17+
name = "xcodeproj_extra_files_subject",
18+
files = ["BUILD"],
19+
tags = ["manual"],
20+
)
21+
22+
provider_contents_test(
23+
name = "provider_contents_test",
24+
target_under_test = ":xcodeproj_extra_files_subject",
25+
)
26+
27+
def xcodeproj_extra_files_test_suite(name):
28+
_test_provider_contents()
29+
30+
native.test_suite(
31+
name = name,
32+
tests = [
33+
":provider_contents_test",
34+
],
35+
)

0 commit comments

Comments
 (0)