[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: When what you are comparing isn't technically equal (split from Re: comparative functions and "same metamethod" gotcha)
- From: Sean Conner <sean@...>
- Date: Thu, 5 Jun 2014 00:34:37 -0400
It was thus said that the Great Andrew Starks once stated:
>
> I can't see where, or even how, busted is/could be broken. I see the
> inconsistent behavior when running the following code block, within a
> busted test:
>
> local a = url("mcp://host/thread/name")
> local b = url("mcp://host/thread/name/")
> assert.True(a == b)
Technically speaking, the two URLs are not identical as the trailing slash
modifies the meaning of "name" in the URL. RFC-3986 states that if the
former redirects to the latter, only then are the equivalent, otherwise, the
first refers to a resource (file) and the second to a directory (section
6.2.4).
-spc