W3C home > Mailing lists > Public > uri@w3.org > March 2003

RFC2396 test cases

From: Graham Klyne <gk@ninebynine.org>
Date: Wed, 05 Mar 2003 21:53:28 +0000
Message-Id: <5.1.0.14.2.20030305200228.00bda410@127.0.0.1>
To: Dan Connolly <connolly@w3.org>
Cc: <uri@w3.org>

Dan,

I think some of your test data is at odds with the RFC:

   base = 'http://a/b/c/d;p?q'
   # C.1.  Normal Examples
   (base, '?y', 'http://a/b/c/?y'), #@@wow... really?

My code, and RFC2396bis, give:
   (base, '?y', 'http://a/b/c/d;p?y')

...

I think this case is suspect:

   (base, '#s', 'http://a/b/c/d;p?q#s'), #@@ was: (current document)#s

I've taken the approach of preserving the empty path to indicate the 
current document.  i.e.

   (base, '#s', '#s')

...

These test cases in your file also are at odds with those in RFC2396bis:

   (base, './g/.', 'http://a/b/c/g/.'), #@@hmmm...
   (base, 'g/./h', 'http://a/b/c/g/./h'), #@@hmm...
   (base, 'g/../h', 'http://a/b/c/g/../h'),
   (base, 'g;x=1/./y', 'http://a/b/c/g;x=1/./y'), #@@hmmm...
   (base, 'g;x=1/../y', 'http://a/b/c/g;x=1/../y'),  #@@hmmm...

I think RFC2396bis is pretty clear about its intent here.

...

That's it ... I've now worked through all the test cases on offer, plus a 
few more of my own.  I'll post a note when my code is online.

#g


-------------------
Graham Klyne
<GK@NineByNine.org>
PGP: 0FAA 69FF C083 000B A2E9  A131 01B9 1C7A DBCA CB5E
Received on Wednesday, 5 March 2003 18:04:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:05 UTC