Skip to content

Bizarre failure to match error signal message with :to-throw #228

@alphapapa

Description

@alphapapa

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:

FAILED: Expected `"\303 \210\301\304\300\242\302\305\300\242%\207"' to throw a child signal of `user-error' with args `("Views that search non-file-backed buffers can't be linked to")', but instead it threw (user-error "Views that search non-file-backed buffers can’t be linked to")

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions