-
Notifications
You must be signed in to change notification settings - Fork 44
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
Bizarre failure to match error signal message with :to-throw #228
Comments
This was a tricky one. I'm not sure if buttercup should do anything with the expected string. It might be better to leave that to the tests. The mismatch explanation should be improved, I debugged this by using the |
Hi @alphapapa , did this help you figure out your failing tests? |
And re-reading your original report, I see you already figured out that it was the apostrophe that was the problem. |
The decision process for quote substitution in The tests in
At least that is how I understand the C code. In this I case I would guess that you get style I see suggested in alphapapa/org-ql#317 that you could use (expect (let ((text-quoting-style 'grave))
(user-error "`bar'"))
:to-throw 'user-error '("`bar'"))) |
Hi Ola, Sorry for the delay in getting back to this. Haven't had time to dig into org-ql stuff for a while. FWIW, here's what
Thanks for the suggestion to use Anyway, I suppose this problem isn't Buttercup's fault, but it would be nice to have it documented somewhere. Maybe it's time for Buttercup to have a FAQ or troubleshooting section in the docs? :) In the meantime I guess I'll have to document it in my package dev handbook... Thanks for digging into this! |
See <jorgenschaefer/emacs-buttercup#228>. (Somehow org-export is broken due to a bug in prism, so the HTML still needs updating.)
The credit for the |
Hi,
I'm stumped. Please see this CI run: https://github.com/alphapapa/org-ql/actions/runs/3662214898/jobs/6191147365#step:6:1008
You can see there that what Buttercup says it is expecting appears to be what is thrown:
And, in fact, when I run this test on my local system, it passes, using Emacs 28.1. But when run on GitHub CI, it fails, as you can see.
Bizarrely, if one copies the two strings from the GitHub CI Web interface into Emacs and tests them with
equal
, the strings do not match. Closer inspection reveals that one of them has an ASCII apostrophe while the other has a Unicode RIGHT SINGLE QUOTATION MARK.So one might think that, somehow, the same had happened in the source code (which wouldn't explain why the test passes locally, but anyway). Yet this is not the case: in the source file, an ASCII apostrophe is used: https://github.com/alphapapa/org-ql/blob/d253b123cf5bf869857ef978e40e2d42c2d301f4/org-ql-view.el#L675 And in the test file, one is also used: https://github.com/alphapapa/org-ql/blob/d253b123cf5bf869857ef978e40e2d42c2d301f4/tests/test-org-ql.el#L2203
So I've no explanation for why this test fails. My best guess is something related to a locale difference on the CI container, but that still doesn't make sense, because in the source code, the strings are the same.
Thanks for your work on Buttercup.
The text was updated successfully, but these errors were encountered: