<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chime/tests/test-chime-sound.el, branch main</title>
<subtitle>Emacs chimes, notifications, and modeline reminders so you don't miss events
</subtitle>
<id>https://git.cjennings.net/chime/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/chime/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/'/>
<updated>2026-07-10T00:58:27+00:00</updated>
<entry>
<title>fix(tests): wait for the sound sentinel, not just the child's exit</title>
<updated>2026-07-10T00:58:27+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-10T00:58:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=e15b780739bb260940ed7d6023056c391b6f7400'/>
<id>urn:sha1:e15b780739bb260940ed7d6023056c391b6f7400</id>
<content type='text'>
process-live-p goes nil the moment the child exits, but its sentinel is queued and runs on a later turn of the event loop. Two sound tests stopped waiting at process death, so the sentinel's message landed inside the next test's message mock.

make coverage caught it. Instrumentation slowed things just enough that "false exited with status 1" showed up in the silent-player test. The plain suite had been passing by luck.

Both tests now wait for the sentinel to have run.
</content>
</entry>
<entry>
<title>test: assert on chime's messages, not on Emacs staying silent</title>
<updated>2026-07-09T22:53:15+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-09T22:53:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=3f0dcdcdf9ad7401867f997ff165bb47cc46c9a4'/>
<id>urn:sha1:3f0dcdcdf9ad7401867f997ff165bb47cc46c9a4</id>
<content type='text'>
Three sound tests mocked message and counted everything it captured. Under make coverage, chime.el loads as instrumented source, so the sentinel lambda compiles on first call and emits "Warning: argument '_event' not left unused" through message. That warning landed in the capture list, the counts came out one high, and the Coverage job failed while all five Emacs versions passed.

The tests now filter captured messages to chime's own. What they mean is that chime reported the failure once, not that nothing in Emacs said anything.

make test and make test-all never load the instrumented source, so they can't catch this. make coverage reproduces it.
</content>
</entry>
<entry>
<title>test: add failing tests for external sound-player selection</title>
<updated>2026-07-09T18:48:06+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-09T18:48:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=cccc205f0163395366f54f83011a161bfce3129c'/>
<id>urn:sha1:cccc205f0163395366f54f83011a161bfce3129c</id>
<content type='text'>
The tests cover player selection, asynchronous spawn, the fallback to play-sound-file, DEVICE passthrough, the exit-status sentinel, and both players failing.

I mock play-sound-file everywhere, so no test opens an audio device. Two tests spawn true or false as a stand-in player, because neither the returned process nor the sentinel's exit status survives a mock.
</content>
</entry>
</feed>
