test: add tests for copying hidden files (#438)

See https://github.com/aspect-build/rules_js/issues/1055
This commit is contained in:
Jason Bedard 2023-05-16 15:57:57 -07:00 committed by GitHub
parent 66da21ff6f
commit e0ae19940c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View File

View File

@ -49,3 +49,28 @@ copy_file(
src = "file1",
out = "file1_copy_b",
)
diff_test(
name = "copy_same_file_a_test",
file1 = ":file1",
file2 = ":file1_copy_a",
)
diff_test(
name = "copy_same_file_b_test",
file1 = ":file1",
file2 = ":file1_copy_b",
)
# Case: can copy a hidden file
copy_file(
name = "copy_hidden_file2",
src = ".file2",
out = "file2_copy",
)
diff_test(
name = "copy_hidden_file_b_test",
file1 = ":.file2",
file2 = ":copy_hidden_file2",
)