Closed
Bug 32813
Opened 25 years ago
Closed 25 years ago
stand-alone test for url parsing
Categories
(Core :: Networking, defect, P3)
Tracking
()
VERIFIED
FIXED
M16
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?
Comment 1•25 years ago
|
||
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.
Comment 3•25 years ago
|
||
Yes, of course, the old test result is wrong with the new URLParser, at least
when calling GetSpec or something similar.
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
Comment 6•24 years ago
|
||
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.
Description
•