aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorE. Westbrook <github@westbrook.io>2018-08-21 12:02:25 -0600
committerE. Westbrook <github@westbrook.io>2018-08-21 12:17:12 -0600
commitca5398be098b571912dcbd93c83ab78151814f99 (patch)
tree6355345432154e3ce550f7f133742653a5ed13c6 /test
parent38d936ec0ea05da9f85a5c582e5073e0d1b82209 (diff)
downloadluasocket-ca5398be098b571912dcbd93c83ab78151814f99.tar.gz
luasocket-ca5398be098b571912dcbd93c83ab78151814f99.tar.bz2
luasocket-ca5398be098b571912dcbd93c83ab78151814f99.zip
url.lua:remove_dot_components(): use temporary NUL marker to reduce empty-segment special-case code
Diffstat (limited to 'test')
-rw-r--r--test/urltest.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/urltest.lua b/test/urltest.lua
index 13deb10..ae8ba75 100644
--- a/test/urltest.lua
+++ b/test/urltest.lua
@@ -692,6 +692,10 @@ check_absolute_url("http://example.com/a/b/c/d/", "../../q", "http://example.com
692check_absolute_url("http://example.com/a/b/c/d/", "../../../q", "http://example.com/a/q") 692check_absolute_url("http://example.com/a/b/c/d/", "../../../q", "http://example.com/a/q")
693check_absolute_url("http://example.com", ".badhost.com", "http://example.com/.badhost.com") 693check_absolute_url("http://example.com", ".badhost.com", "http://example.com/.badhost.com")
694check_absolute_url("http://example.com/a/b/c/d/", "..//../../../q", "http://example.com/a/q") 694check_absolute_url("http://example.com/a/b/c/d/", "..//../../../q", "http://example.com/a/q")
695check_absolute_url("http://example.com/a/b/c/d/", "..//a/../../../../q", "http://example.com/a/q")
696check_absolute_url("http://example.com/a/b/c/d/", "..//a/..//../../../q", "http://example.com/a/b/q")
697check_absolute_url("http://example.com/a/b/c/d/", "..//a/..///../../../../q", "http://example.com/a/b/q")
698check_absolute_url("http://example.com/a/b/c/d/", "../x/a/../y/z/../../../../q", "http://example.com/a/b/q")
695 699
696print("testing path parsing and composition") 700print("testing path parsing and composition")
697check_parse_path("/eu/tu/ele", { "eu", "tu", "ele"; is_absolute = 1 }) 701check_parse_path("/eu/tu/ele", { "eu", "tu", "ele"; is_absolute = 1 })