Closed Bug 32813 Opened 25 years ago Closed 25 years ago

stand-alone test for url parsing

Categories

(Core :: Networking, defect, P3)

All
Other
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: warrensomebody, Assigned: gagan)

Details

(Whiteboard: 1d)

We should rework netwerk/test/urltest.cpp so that it's a little easier to specify the test cases and expected results. That will let QA run it periodically. Right now if you run it with a list of urls, you get output like this for each one of them: Analyzing http://warren:asdf@foo:23/bar/baz.html?y=z Got http,warren:asdf,foo,23,y=z,/bar/baz.html?y=z I think it would be better if you could specify the above -- both the input url and breakdown of the parsed representation -- as alternating line in an input file so that (a) it would be easy for the test to just print out a PASS/FAIL result, and (b) it's easy to append new tests to a master test file. (Also note that there are now more URL fields than broken down by the above parse, e.g. file extension is separate now.) As a side task, we should dig up all the url parsing bugs we've had and append them into such a test file. Andreas: Can you help Tom put that together?
Status: NEW → ASSIGNED
Target Milestone: --- → M15
I have a different version of urltest in usage that prints out all the different parts of the url + GetSpec. I planned on extending it with GetPrehost, GetFileName, GetPath, ... and was searching for a new format to do it.
I have changed this to now optionally read from a file and print the number of tests failed/passed. BTW Andreas- the test for % in the username is failing (I guess you already know about that) I will check in my changes today.
Yes, of course, the old test result is wrong with the new URLParser, at least when calling GetSpec or something similar.
Moving what's not done for M15 to M16.
Target Milestone: M15 → M16
Whiteboard: 1d
fix checked in. Use "urltest -file urltests.dat" for running the tests specified in urltests.dat. Tever you can add more tests to urltests.dat based on our earliar bugs.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
QA Contact: tever → bbaetz
VERIFYING. andreas has some more patches in one of the bugs i'm ccd on (can't find it now though), but whats there is checked in.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.