test/ectest.c: add regression test for RT#4284.