In the original json code, search matching nothing would return a
valid, empty json array (that is, "[]"). I broke this in commit 6dcb7592e32ed5140ea0c0357ce78d6a37af6066 when adding support for
--output=threads|messages|tags. This time, while fixing the bug also
add a test to the test suite to help avoid future regressions.