Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
2015 CPAN PR Challenge - PR #3 - Test HTML Parsing #6
This pull request introduces a new test program that demonstrates the flaws in the regular expression used to parse the HTML. I am new to writing unit tests, test-driven development, and writing tests in Perl too. This is just a contrived program to show the alleged flaws. I tried to test it by hard-coding a "correct" transformation of the input HTML and verifying that the tests all pass. Hopefully that is still true after rebasing.
The test program uses File::Temp to log diagnostic information that would be noisy on the terminal. It might be helpful to understand why the tests are failing. Additionally, it might be useful to identify bugs in the tests themselves once work begins on replacing the regular expression with a proper parser.
I originally wanted to submit another branch that actually fixes these tests by using HTML::Parser and reimplmenting both of HTML::FillInForms and HTML::StickyQuery. I ran out of time and motivation this month so officially that patch won't make it into the challenge, but I'll still do my best to come up with something when time and motivation permit unless you beat me to it. Make sure you don't release after merging this branch until fixing the HTML parsing because the tests will fail and users will be quite annoyed when
If you have any trouble merging feel free to contact me! I'll do the work of rebasing for you so you don't have to fuss with it! Thanks!
Danger Will Robinson: I don't know why, but now the tests introduced by this pull request appear not to be failing properly. Only 1 test is failing, but all 10 of them should fail... I'm not seeing any updates from you to fix the regular expression so I'm at a loss for why the tests aren't failing now. To be fair, I am pretty drunk. ;)
I'll have to look into this to determine why it's not making sense... Perhaps tomorrow once I am rested and sober. In the meantime, this branch might be broken. I don't know if it was caused by the merge+rebase of my other branches or if I made a mistake with the tests... I'll update this thread when I have figured out what went wrong.