Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This relates to pull request #303 which should resolve issue #302.
The change proposed in this pull request is the addition of a testthat in the roxygen2 test suite to check that
update_collate
actually does do nothing if no@includes
are found (and in particular leaves any manually entered Collate field unaltered).The test uses a template package called
testCollateNoInclude
, the key feature of which is that the DESCRIPTION file has a Collate field which was entered manually rather than generated by roxygen2 as a consequence of@include
directives. The .r files in the R directory do not have any@includes
.The template package is copied into
tempdir()
before running the tests, since update_collate can have permanent side effects (viz generating a Collate field in the DESCRIPTION file). Ifupdate_collate
was run on the template package itself, rather than on the copy intempdir()
, and the test failed, the template package would be altered, and future runs of the test would not be testing what the test is supposed to test.I had intended to make this entirely separate from the fix mentioned in pull request #303 , but due to my learner level of competence with git this branch also includes the fix itself. If that is a problem, let me know and I will recreate it as an independent branch in the way I originally intended.
Feedback and guidance (re the pull request and/or my usage of git) most appreciated.
Geoff