2023-03-17 16:06:24 +01:00
[
2023-04-20 14:12:50 +02:00
{ "fn" : "url" , "data" : "http://foo.com?foo=1#mypredefinedview" , "expect" : { "fn" : "testPredefinedView" , "input" : "mypredefinedview" , "out" : true } , "label" : "test predefined view executed" } ,
{ "fn" : "url" , "data" : "http://foo.com?foo=1#mypredefinedview&another" , "expect" : { "fn" : "testPredefinedView" , "input" : "another" , "out" : true } , "label" : "test predefined view executed (multiple)" } ,
2023-04-20 18:49:18 +02:00
{ "fn" : "url" , "data" : "http://foo.com?foo=1#mypredefinedview&another" , "expect" : { "fn" : "testPredefinedView" , "input" : "mypredefinedview" , "out" : true } , "label" : "test predefined view executed (multiple)" } ,
2024-03-29 17:36:48 +00:00
{ "fn" : "url" , "data" : "http://foo.com?foo=1#mycustom=foo" , "expect" : { "fn" : "testParsed" , "input" : "mycustom" , "out" : true } , "label" : "test custom property" } ,
2024-04-04 10:18:19 +00:00
{ "fn" : "url" , "data" : "http://foo.com?foo=1#mycustom=foo" , "expect" : { "fn" : "testURL" , "input" : "scheme" , "out" : "http" } , "label" : "test URL scheme http" } ,
2024-04-04 16:48:39 +00:00
{ "fn" : "url" , "data" : "http://foo.com/a/b?foo=1#mycustom=foo" , "expect" : { "fn" : "testURL" , "input" : "path" , "out" : "/a/b" } , "label" : "test URL path /a/b" } ,
2024-04-08 14:12:29 +00:00
{ "fn" : "url" , "data" : "http://foo.com/a/b?foo=1#mycustom=foo" , "expect" : { "fn" : "testURL" , "input" : "hash.mycustom" , "out" : "foo" } , "label" : "test URL hash #mycustom == foo" } ,
2024-04-10 10:54:24 +00:00
{ "fn" : "url" , "data" : "http://foo.com/a/b" , "expect" : { "fn" : "testURL" , "input" : "path" , "out" : "/a/b" } , "label" : "test URL path /a/b/" } ,
{ "fn" : "url" , "data" : "http://foo.com/a/b?foo=1#mycustom=foo" , "expect" : { "fn" : "testURLBrowse" , "input" : "host" , "out" : "foo.com" } , "label" : "test URLBrowser" } ,
{ "fn" : "url" , "data" : "http://foo.com/a/b?https://foo.com/abc#mycustom=foo" , "expect" : { "fn" : "testURL" , "input" : "path" , "out" : "/a/b" } , "label" : "test URL url-in-query" } ,
{ "fn" : "url" , "data" : "http://foo.com/a/b?https://foo.com/abc#mycustom=foo" , "expect" : { "fn" : "testURLBrowse" , "input" : "path" , "out" : "/a/b" } , "label" : "test URLBrowser url-in-query" } ,
{ "fn" : "url" , "data" : "/bar/flop#mycustom=foo" , "expect" : { "fn" : "testURLBrowse" , "input" : "host" , "out" : "foo.com" } , "label" : "test URLBrowser (maintain host)" } ,
{ "fn" : "url" , "data" : "/bar/flop?foo=1#mycustom=foo" , "expect" : { "fn" : "testURLBrowse" , "input" : "query" , "out" : "foo=1" } , "label" : "test URLBrowser (parse query)" } ,
{ "fn" : "url" , "data" : "/flop/flap#mycustom=foo" , "expect" : { "fn" : "testURLBrowse" , "input" : "path" , "out" : "/flop/flap" } , "label" : "test URLBrowser (overwrite path)" } ,
{ "fn" : "url" , "data" : "/bar/flop#mycustom=foo" , "expect" : { "fn" : "testURLBrowse" , "input" : "path" , "out" : "/bar/flop" } , "label" : "test URLBrowser (overwrite path 2)" } ,
{ "fn" : "url" , "data" : "/bar/flop#mycustom=foo" , "expect" : { "fn" : "testURLBrowse" , "input" : "host" , "out" : "foo.com" } , "label" : "test URLBrowser (maintain host)" } ,
{ "fn" : "url" , "data" : "c/d?foo=1#mycustom=foo" , "expect" : { "fn" : "testURLBrowse" , "input" : "path" , "out" : "/bar/flop/c/d" } , "label" : "test URLBrowser (append path+query)" } ,
2024-04-15 14:06:54 +00:00
{ "fn" : "url" , "data" : "a/b#foo=bar" , "expect" : { "fn" : "testURL" , "input" : "hash.foo" , "out" : "bar" } , "label" : "test URL hash #mycustom == foo" } ,
2024-07-09 17:27:21 +00:00
{ "fn" : "url" , "data" : "./../../xyz" , "expect" : { "fn" : "testURLBrowse" , "input" : "path" , "out" : "/bar/flop/c/d/./../../xyz" } , "label" : "test URL relative path" } ,
{ "fn" : "url" , "data" : "./../../xyz" , "expect" : { "fn" : "testURLBrowse" , "input" : "path" , "out" : "/bar/flop/c/d/./../../xyz" } , "label" : "test URL relative path" } ,
{ "fn" : "url" , "data" : "a/b?index.glb#foo=bar://foo/flop.gltf" , "expect" : { "fn" : "testURL" , "input" : "directory" , "out" : "/a/b" } , "label" : "test URLhash with protocol" }
2023-03-17 16:06:24 +01:00
]