Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Extended regex always counts as uncovered #43

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

Extended regex always counts as uncovered #43

rhunter opened this issue Jan 13, 2010 · 3 comments

Comments

@rhunter
Copy link

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
@orenbenkiki
Copy link

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
Copy link

mezis commented Jan 16, 2012

Still the case with 0.9.11.

@abedra
Copy link
Contributor

abedra commented Jan 18, 2012

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants