Skip to content
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

Return hasht when rebuilding from load data #666

Merged
merged 2 commits into from
Feb 8, 2025

Conversation

matsl
Copy link
Collaborator

@matsl matsl commented Feb 6, 2025

What

Return hasht when rebuilding from load data and add test cases that
depends on the fix.

Why

The result of hywiki-make-referent-hasht is used as a hash table in
some case so it is important that the new value is returned.

The successful test case depends on this change.

The expected failed test case illustrates that the key series is
inserted in the buffer as well as in the definition of the
referent. This can be shown manually too so it does not only happen in
the test case. This test case is only activated when run interactively
like test-all.

Add test cases that depends on the fix.
@matsl matsl force-pushed the add-referent-save-and-restore-tests branch from 2315a9c to a78795a Compare February 6, 2025 23:48
@matsl matsl requested a review from rswgnu February 6, 2025 23:49
(hy-delete-dir-and-buffer hywiki-directory))))

(ert-deftest hywiki-tests--save-referent-use-hyperbole-menu ()
"Verify saving and loading a referent works when using Hyperboles menu."
Copy link
Owner

Choose a reason for hiding this comment

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

Hyperbole’s

test/hywiki-tests.el Show resolved Hide resolved
(ert-deftest hywiki-tests--save-referent-use-hyperbole-menu ()
"Verify saving and loading a referent works when using Hyperboles menu."
:expected-result :failed
;; The entered key series is inserted into the WikiWord file.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don’t understand the expected fail. Are you showing that you found an issue with key series as a referent that your hasht fix does not resolve? If so, you should also comment the code with the problem rather than just letting the failed test demonstrate it, for my small mammalian brain.

Here is the comment that tries to explain it but I can move it down to the should check that fails.

@matsl matsl merged commit 3558ba5 into master Feb 8, 2025
4 checks passed
@matsl matsl deleted the add-referent-save-and-restore-tests branch February 8, 2025 21:52
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