Closed dieghernan closed 2 years ago
Ping @matthewwiese
If you're looking for additional testing material, try the Collection of Computer Science Bibliographies whose entries contain their BibTeX source. I discovered it thanks to this Academia StackExchange comment some time back. Also, I think increasing coverage of malformed input is important. Currently there appears to be only two cases (1, 2) of error checking; if the effort will be made to rewrite the package then making sure it fails gracefully is crucial.
Otherwise, glad to see your enthusiasm on this!
HI @matthewwiese :
I tried to add more test on errors due to unbalanced braces, etc (see also #42 and tests/testthat/test-fatal-errors.R
but unfortunately the package crashes. I left them (skipped) as a reminder for future improvements
UPDATE: Now not skipped in #47
Hi @coatless , did you have the chance of having a look on this? Regards
Thanks @coatless, I made some minor amendments following your comments. Ready for merge
This PR increases the test suite for
bibtex
package (Phase 1: Current state / Testing on #45 ). I tried to cover as many cases as I can, including also some additional .bib files for testing purposes:do_read_bib()
(tests/testthat/test-do_read_bib.R) reading non-standard BiBTeX entries that is used on https://github.com/ropensci/RefManageR (@mwmclean).The tests mainly covers the R source code. It seems to be that a lot of the C code is not currently used (¿?).
Additionally, I upgraded testthat version to 3 (this allows the use of snapshots, that would be useful for testing Phase 2) and improved the R-CMD-Check action to increase the number of platforms on which the package is tested.
Any further improvements on the testing welcomed.
PS: Note that neither R not C code has been modified so far.