Add test for libmarisa formula