filter_parser: reorganize tests for abnormal cases
Which issue(s) this PR fixes: None.
What this PR does / why we need it:
Adds and reorganizes tests of filter_parser for abnormal cases.
The following PR will significantly change the implementation of filter_parser.
- #4620
However, currently, there aren't enough tests for abnormal cases. This condition makes it difficult to safely make such a large change. This PR solves the problem.
Docs Changes: Not needed.
Release Note: Same as the title. (Or not needed because this changes only the test codes.)
Ruby 2.7 tests fail because Ruby 2.7 does not support Hash#except.
I'm fixing it.
@kenhys Could you please review this?
Rebased to the latest master. I'll split this fix into several commits.
Thanks!