Perl-Critic / PPI

54 stars 44 forks source link

Add test covering misparse bug for '(1)-1' #220

Closed majlo closed 5 years ago

majlo commented 7 years ago

In code '(1)-1' is -1 parsed as a number rather than operator and 1. This commit adds a TODO test that covers this scenario and more other tests covering correct behaviour for '(1)+1' etc.

This provides test coverage for #43

Done as part of CPAN pull request challenge.

wchristian commented 5 years ago

Thanks for the patch, it's been released as: https://metacpan.org/release/MITHALDU/PPI-1.250