<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gloss/tests/test-testutil-gloss--load-wiktionary-fixture.el, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.cjennings.net/gloss/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/gloss/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/gloss/'/>
<updated>2026-04-28T23:08:09+00:00</updated>
<entry>
<title>test: add Wiktionary fixture loader helper</title>
<updated>2026-04-28T23:08:09+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-28T23:08:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/gloss/commit/?id=3a846506399dc12ab219bfa8047947c122dd1d04'/>
<id>urn:sha1:3a846506399dc12ab219bfa8047947c122dd1d04</id>
<content type='text'>
Append `gloss-test--load-wiktionary-fixture' to tests/testutil-gloss.el. It takes a fixture name (e.g. "anaphora") and returns the raw JSON body from tests/fixtures/wiktionary-NAME.json, or signals `error' with the full path when the file isn't there. The helper resolves the fixtures directory from a `defconst' captured at load time. That way it works the same whether a test file requires testutil-gloss directly or pulls it in transitively through `make test'.

Three ERT cases under tests/test-testutil-gloss--load-wiktionary-fixture.el cover Normal (anaphora loads as a non-empty JSON string), Boundary (the smallest fixture, 404, loads), and Error (a missing fixture raises with the path embedded in the message).

Verified with `make test': 35 passed, 0 unexpected.
</content>
</entry>
</feed>
