emacs: add a test

Closes #27718.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>