Handle file-level docstrings in prog-mode #78
Merged
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.
Closes #77.
This seems to work in a python file with a file level docstring.
As you'll see I really just adapted the existing
beginend--point-is-in-comment-p
(private) function. Not sure if I fully understand thelet
form yet so it may not be necessary inbeginend--point-is-in-string-p
. Plus you may not like this solution as it probably goes against the principles of the DRY methodology.Not entirely sure how I should run the tests. I executed
buttercup-run-at-point
at the top leveldescribe
form inbeginend-prog-test.el
which resulted in the following output. Perhapsbuttercup
should have abuttercup-run-on-buffer
type command as well. The individual test times are interesting. I added the new "for a docstring" test.The
buttercup docs
only document running tests when usingcask
,eldev
, andeask
but I think you usemakel.mk
right?Since you use
buttercup
why do you need the.ert-runner
file? Is it because you refer to${TEST_ERT_FILES}
in your Makefile. Excuse my ignorance here.Finally, I noted the following comment at several places in
begined-prog-test.el
:;; workaround for https://github.com/jorgenschaefer/emacs-buttercup/issues/84
But if understand the exchange in that issue then these comments are obsolete as you have put
spy-on
in abefore-each
form. I have left them in for now but can remove them if you agree.