Skip to content

Commit

Permalink
Add a test for picking up globs in a filegroup. (#602)
Browse files Browse the repository at this point in the history
No new feature, I just want the test to make sure we don't backslide on this.
  • Loading branch information
aiuto authored Sep 7, 2022
1 parent 5b8a851 commit 0cbfa84
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ filegroup(
visibility = ["//visibility:public"],
)

filegroup(
name = "glob_for_texts",
srcs = glob(["**/*.txt"]),
)

py_test(
name = "archive_test",
srcs = [
Expand Down
11 changes: 11 additions & 0 deletions tests/mappings/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,14 @@ manifest_golden_test(
expected = ":executable_test_expected",
target = "executable_manifest",
)

write_content_manifest(
name = "glob_for_texts_manifest",
srcs = ["//tests:glob_for_texts"],
)

manifest_golden_test(
name = "glob_for_texts_manifest_test",
expected = "glob_for_texts_manifest.golden",
target = "glob_for_texts_manifest",
)
6 changes: 6 additions & 0 deletions tests/mappings/glob_for_texts_manifest.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
[0, "file_with_a_ridiculously_long_name_consectetur_adipiscing_elit_fusce_laoreet_lorem_neque_sed_pharetra_erat.txt", "tests/testdata/file_with_a_ridiculously_long_name_consectetur_adipiscing_elit_fusce_laoreet_lorem_neque_sed_pharetra_erat.txt", "", null, null],
[0, "hello.txt", "tests/testdata/hello.txt", "", null, null],
[0, "loremipsum.txt", "tests/testdata/loremipsum.txt", "", null, null],
[0, "test_tar_package_dir_file.txt", "tests/testdata/test_tar_package_dir_file.txt", "", null, null]
]

0 comments on commit 0cbfa84

Please sign in to comment.