Extended regex always counts as uncovered #43

Open
rhunter opened this Issue Jan 13, 2010 · 3 comments

Comments

Projects
None yet
4 participants

rhunter commented Jan 13, 2010

I just had a failing rcov run on code that kind of suprised me.

When rcov 0.9.6 scans extended regular expressions (multi-line with comments), only the first line is considered "covered" -- the remains are always uncovered.

For example, only the first line of the following will be "covered":

regex = /
  https? # http or https
  \:\/\/ # colon-slash-slash
  ( # hostname (capture group 1)
    [A-Za-z0-9.-] # any seperators
  )
  \/ # trailing slash
/x

Just hit on that myself. I'm writing my code with a threshold 100% coverage and this forces me to put the whole thing on one line, which isn't very readable.

mezis commented Jan 16, 2012

Still the case with 0.9.11.

Contributor

abedra commented Jan 18, 2012

This is another one of the multiline bugs. I will create a new category to group these

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment