q: add test

Closes #26895.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>