-
Notifications
You must be signed in to change notification settings - Fork 11
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
Refactor tests to use with-simulated-input #634
base: master
Are you sure you want to change the base?
Conversation
da52254
to
458acef
Compare
test/hywiki-tests.el
Outdated
(should (equal '(bookmark . "bkmark") (hywiki-add-bookmark "WikiWord"))))) | ||
(bookmark-set "bookmark") | ||
(with-simulated-input "bookmark RET" | ||
(should (equal '(bookmark . "bookmark") (hywiki-add-bookmark "WikiWord"))))) |
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.
Rewrite like other tests where you first call hywiki-add-bookmark and then the should checks against hywiki-get-referent.
test/hywiki-tests.el
Outdated
(hywiki-add-info-index "WikiWord") | ||
(should (equal '(info-index . "(info)index-name") (hywiki-get-referent "WikiWord")))) | ||
(should (equal '(info-index . "(emacs)Top") (hywiki-get-referent "WikiWord")))) |
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.
This should be an Info index entry not an Info node.
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.
Need to have some assistance here. Changed to "(emacs)files" but I guess that is still a node? Tried to use the function (hywiki-find-referent "WikiRefNew" t)
interactively but I can't make it work. So I likely need some education here or there are problems with the functionality.
I was also expecting to find the possibility to add a referent in the hyperbole menu but had to call the function directly as given above to get the chance to select what type of referent it should be.
853470d
to
e095629
Compare
In an Info manual, go to the end of the manual toc and you’ll see the indexes there. Navigate to one and then choose any index entry name from there as your test case, e.g. "(hyperbole)hyperbole-directory".
Use {C-u C-h h h c} to be prompted for the referent type when using the Create command. -- Bob
|
"(emacs)files" is a valid index then. (But see my skepticism below)
Thanks for this. Although the docstring said use a prefix arg I did not expect that to be used with the regular hyperbole menu. But I have only been using it since 1993 so I guess I have a few more years to go before I can master it! ;-) Anyway. It does not work for me. I'll send you a video to show what happens. (But that has to wait until tomorrow!) |
What
Use
with-simulated-input
in more tests.Why
Covers issues with using user input for constructing the referent
info.
Note
Not all tests related to
hywiki-get-referent
has been refactored dueto rather big test setups and coverage in other tests.