Skip to content

Conversation

@matsl
Copy link
Collaborator

@matsl matsl commented Feb 1, 2026

What

Further improvement.

@matsl matsl requested a review from rswgnu February 1, 2026 22:40
Copy link
Owner

@rswgnu rswgnu left a 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.

matsl added 2 commits February 2, 2026 09:46
* 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.
@matsl matsl force-pushed the matsl_make_hywiki-tests--word-at_robust_and_based_on_hywiki-word-at branch from 8af2775 to d7be1a7 Compare February 2, 2026 14:43
@matsl
Copy link
Collaborator Author

matsl commented Feb 2, 2026

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.

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.

@matsl matsl requested a review from rswgnu February 2, 2026 14:59
(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)
Copy link
Collaborator Author

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
Copy link
Collaborator Author

@matsl matsl Feb 2, 2026

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.

@matsl
Copy link
Collaborator Author

matsl commented Feb 2, 2026

@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...)

@matsl matsl closed this Feb 2, 2026
@matsl matsl mentioned this pull request Feb 2, 2026
@rswgnu
Copy link
Owner

rswgnu commented Feb 2, 2026 via email

@matsl
Copy link
Collaborator Author

matsl commented Feb 3, 2026

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, hywiki-word-at is not touched. It is hywiki-tests--word-at that is made more robust. It is only used in tests. It will now when verification of highlighting is activated fail if hywiki-word-at says there is a wikiword but highlighting does not.

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.

@matsl matsl deleted the matsl_make_hywiki-tests--word-at_robust_and_based_on_hywiki-word-at branch February 3, 2026 10:30
@rswgnu
Copy link
Owner

rswgnu commented Feb 3, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants