Yeah, and the R ecosystem has this built in (checking the examples run, not their output is correct). `R CMD check` has as one of its checks whether the examples you build in the help docs generate runtime errors.
I use roxygen example help file generation as well for R packages, but have mixed feelings relative to python documentation.