-
Notifications
You must be signed in to change notification settings - Fork 12
Make hywiki-tests--word-at more robust #849
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
Make hywiki-tests--word-at more robust #849
Conversation
rswgnu
left a comment
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.
Hi Mats: As some of these were updates were already in the latest rsw branch, I hand applied the ones that were not and added the changes under your name in the ChangeLog. So this PR can be closed and should no longer be needed. Seems 3 tests continue to fail. I'll email them to you.
* Use range of wikiword to guide highlighting test. * Require wikiword to exist. * Create wikiwords in tests that is using hywiki-tests--word-at. * Let hywiki-tests--run-test-case start from state in buffer so test cases can prepare it. If buffer needs to be empty use erase-buffer. * Drop interactive requirement on tests that does not require it any more.
8af2775 to
d7be1a7
Compare
I was impressed by how you managed to get all those changes in and happy to see the good results. Well done! I did a rebase and looked over what could be improved further and you'll find it here. More tests are working now. I also rolled back to the previous version of hywiki-tests--word-at and made it so that if hywiki-word-at finds a wikiword then if we test highlighting it must also find a wikiword. So that not missing highlighting indicates there is no wikiword. That caused on test to fail. I have failed to fix it so I marked it as expected failed. Will point to the places with other comments. |
| (defun hywiki-tests--word-at () | ||
| "Test if there is a HyWikiWord reference at point with a referent. | ||
| Choose what test to perform based on value of `hywiki-tests--with-face-test'." | ||
| (when (hywiki-referent-exists-p) |
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 will if the wikiword exists and is found report it is not a wikiword if the highlighting fails. Is that correct? I would rather it be so that if the wikiword exists and is found then if we check highlighting that should find the wikiword or else it is an error. WDYT?
|
|
||
| (ert-deftest hywiki-tests--wikiword-identified-in-emacs-lisp-mode () | ||
| "Verify WikiWord is identified when surrounded by delimiters in `emacs-lisp-mode'." | ||
| :expected-result :failed |
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.
With the requirement that WikiWords that are found must be highlighted then this test fails. Hence it is marked as expected failed so we can work on it without blocking this update.
|
@rswgnu Read your email now that you have merged to master. I will then close this and try my luck with a PR for he master branch instead. (So easy to miss, merged to master or merged with master etc...) |
|
On Mon, Feb 2, 2026 at 9:59 AM Mats Lidell ***@***.***> wrote:
*matsl* left a comment (rswgnu/hyperbole#849)
<#849 (comment)>
I also rolled back to the previous version of hywiki-tests--word-at and
made it so that if hywiki-word-at finds a wikiword then if we test
highlighting it must also find a wikiword. So that not missing highlighting
indicates there is no wikiword. That caused on test to fail. I have failed
to fix it so I marked it as expected failed. Will point to the places with
other comments.
I see what you are saying; let's discuss. I have some concern that
including highlighting in hywiki-word-at will lead to new issues. We
already have other functions to test with highlighting, so I need to
understand what problems you want to solve first.
|
No, This is to check the invariant that highlighting always is in sync with whether it is an existing wikiword or not. See PR #850 for the proposed updates. |
|
I thought I had done this with an update. I made two days ago let me check and then if not, we can go through your code.
…-- Bob
|
What
Further improvement.