Skip to content

Extend tests of hywiki-display-referent-type#990

Merged
matsl merged 1 commit into
masterfrom
extend_test_of_hywiki-display-referent-type
Jun 30, 2026
Merged

Extend tests of hywiki-display-referent-type#990
matsl merged 1 commit into
masterfrom
extend_test_of_hywiki-display-referent-type

Conversation

@matsl

@matsl matsl commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

What

Extend tests of hywiki-display-referent-type

  • test/hywiki-tests.el (hywiki-display-hywiki-test): Add helper
    display function.
    (hywiki-tests--display-referent-type): Verify right display function
    is called and hbut:current attributes are set.

Why

The call to the display function was not covered directly.

@matsl matsl requested a review from rswgnu June 25, 2026 22:38
@rswgnu rswgnu changed the title Extent tests of hywiki-display-referent-type Extend tests of hywiki-display-referent-type Jun 25, 2026

@rswgnu rswgnu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking if you use a link-to-bookmark referent type, the display test verifies that the buffer and point match the ones linked to, and so on for all of the referent types.

@matsl

matsl commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator Author

I'm thinking if you use a link-to-bookmark referent type, the display test verifies that the buffer and point match the ones linked to, and so on for all of the referent types.

I'll respond on that tomorrow.

This PR is a general test that the function hywiki-display-referent-type handles error and builds the right display function plus setting the attributes. That does not have to be verified for each type. Not claiming that the test handles everything but is a good test of the function.

@matsl matsl force-pushed the extend_test_of_hywiki-display-referent-type branch from 172b0ab to d247771 Compare June 29, 2026 13:38
@matsl

matsl commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

I'll respond on that tomorrow.

It took longer than one day and I replied in a separate mail. What it boiled down to is that this is a unit test of the hywiki-display-referent-type function and does not replace testing the functions performing the display action. That will be covered in future planned work.

@matsl matsl requested a review from rswgnu June 29, 2026 14:37
Comment thread test/hywiki-tests.el
@rswgnu

rswgnu commented Jun 29, 2026

Copy link
Copy Markdown
Owner

I'll respond on that tomorrow.

It took longer than one day and I replied in a separate mail. What it boiled down to is that this is a unit test of the hywiki-display-referent-type function and does not replace testing the functions performing the display action. That will be covered in future planned work.

Ok.

@matsl matsl force-pushed the extend_test_of_hywiki-display-referent-type branch from d247771 to 4cb2606 Compare June 29, 2026 19:51
@matsl matsl requested a review from rswgnu June 29, 2026 19:53
* test/hywiki-tests.el (hywiki-display-hywiki-test): Add helper
display function.
(hywiki-tests--display-referent-type): Verify right display function
is called and hbut:current attributes are set.
@matsl matsl force-pushed the extend_test_of_hywiki-display-referent-type branch from 4cb2606 to 9cabce5 Compare June 30, 2026 06:51
Comment thread test/hywiki-tests.el
Comment thread test/hywiki-tests.el
@matsl matsl merged commit c7dacd5 into master Jun 30, 2026
4 checks passed
@matsl matsl deleted the extend_test_of_hywiki-display-referent-type branch June 30, 2026 11:49
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.

2 participants