-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore hidden dirs, and non .m/texinfo files #116
Conversation
Explicitly list the sort of "format" we can deal with instead of just assuming all non-texinfo are plain text. This is a bit more future proof too. Looks like there is an Octave bug where "get_help_text ('blah.m')" can return "Not found" instead of "Not documented", work around.
Its fine in Matlab but a single entry of a string can be multiple bytes of utf-8 in Octave.
I'll merge this in 24 hours or so (if not objections). I'd like to release a 0.4.1 soon... |
One possible concern, maybe its overly verbose?
BTW, if you explicitly try to test a non m-file, you'll still get an (improved) error message:
(this is intended: it would be annoying to silently ignore it!) |
continue | ||
elseif (strcmp(f(1), '@')) | ||
% strip @ to prevent processing as a directory | ||
f = f(2:end); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this have any implications for when there exist both a @foo
and a foo
directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might! I've not changed that behaviour with this commit though. Filed #120.
"single char" might be unicode (utf-8) on Octave.
Allow existence of both `foo` and `@foo`. Fixes #120. So both `doctest @foo` and `doctest foo` will work. Strip `@` locally in the collect_targets_class() function, where it causes problems, instead of trying to do this elsewhere. When nonrecursive, stay out of `foo` when `@foo` happens to exist. Add a `test/test_shadow/`.
Ok, I think this is ready, although I have not yet tested on Matlab. |
actually, I can test on Matlab, and there seem to be some problems with classes so I will investigate. Not merge-able yet :( |
I broke this previously, by not stripping "@" during the traversal. In the new approach, we leave the problem of stripping "@" to the "collect_targets_..." functions. So add special treatment to the top of "doctest_collect" were we classify the argument.
Also, "doctest class/method". Fixes #124.
I wanted the ctor to have 2 tests and the method to have 1 so I could tell which is was doing during debugging.
Ok works for me now on Matlab. Also fixed another pre-existing bug on Matlab. |
Finish a sentence I left hanging (oops) and add a link to the Octave bug about using "test" on private dirs.
Ok to commit this? |
Despite the comments in our code, this seems to work fine. Fixes #121
Sure! |
Ignore hidden dirs, and non .m/texinfo files
Some fixes for various bugs. I did not add config flags: I figure we can add later if there is a use case...
Most importantly it stays out of one's
.git