Error was happed if replace-all doesn't cause any hit.
Store search result.
fix test