docs(write_source_file): specify the name of the generated diff_test (#410)
Fix #409
diff --git a/docs/write_source_files.md b/docs/write_source_files.md
index 09c5d93..1e7d434 100644
--- a/docs/write_source_files.md
+++ b/docs/write_source_files.md
@@ -13,7 +13,7 @@
Write a file or directory to the source tree.
-By default, `diff_test` targets are generated that ensure the source tree file or directory to be written to
+By default, a `diff_test` target ("{name}_test") is generated that ensure the source tree file or directory to be written to
is up to date and the rule also checks that the source tree file or directory to be written to exists.
To disable the exists check and up-to-date test set `diff_test` to `False`.
diff --git a/lib/private/write_source_file.bzl b/lib/private/write_source_file.bzl
index c08a411..8f2c269 100644
--- a/lib/private/write_source_file.bzl
+++ b/lib/private/write_source_file.bzl
@@ -23,7 +23,7 @@
**kwargs):
"""Write a file or directory to the source tree.
- By default, `diff_test` targets are generated that ensure the source tree file or directory to be written to
+ By default, a `diff_test` target ("{name}_test") is generated that ensure the source tree file or directory to be written to
is up to date and the rule also checks that the source tree file or directory to be written to exists.
To disable the exists check and up-to-date test set `diff_test` to `False`.