test url parsing
This commit is contained in:
parent
fcc06319b3
commit
b719d733ca
@ -1,17 +1,16 @@
|
|||||||
// basd on RFC3986 and RFC6874
|
// based on RFC3986 and RFC6874
|
||||||
|
|
||||||
// char types:
|
// char types:
|
||||||
digit:alias:failpass = [0-9];
|
digit:alias:failpass = [0-9];
|
||||||
hex:alias:failpass = [0-9a-fA-F];
|
hex:alias:failpass = [0-9a-fA-F];
|
||||||
alpha:alias:failpass = [a-zA-Z];
|
alpha:alias:failpass = [a-zA-Z];
|
||||||
|
|
||||||
// delimiter:
|
// delimiters and reserved:
|
||||||
// delimiter:alias:failpass = ":" | "/" | "?" | "#" | "[" | "]" | "@";
|
// listing allowed chars, so delimiters and reserved are not referenced, only listing as documentation:
|
||||||
subdelimiter:alias:failpass = "!" | "$" | "&" | "'" | "(" | ")" | "*" | "+" | "," | ";" | "=";
|
// delimiter = ":" | "/" | "?" | "#" | "[" | "]" | "@";
|
||||||
unreserved:alias:failpass = alpha | digit | "-" | "." | "_" | "~";
|
// reserved = delimiter | subdelimiter;
|
||||||
|
subdelimiter:alias:failpass = "!" | "$" | "&" | "'" | "(" | ")" | "*" | "+" | "," | ";" | "=";
|
||||||
// reserved:
|
unreserved:alias:failpass = alpha | digit | "-" | "." | "_" | "~";
|
||||||
// reserved:alias:failpass = delimiter | subdelimiter;
|
|
||||||
percent-encoded:alias:failpass = "%" hex{2};
|
percent-encoded:alias:failpass = "%" hex{2};
|
||||||
path-char:alias:failpass = unreserved | percent-encoded | subdelimiter | ":" | "@";
|
path-char:alias:failpass = unreserved | percent-encoded | subdelimiter | ":" | "@";
|
||||||
|
|
||||||
|
|||||||
4
go.mod
4
go.mod
@ -1,6 +1,6 @@
|
|||||||
module code.squareroundforest.org/arpio/treerack
|
module code.squareroundforest.org/arpio/treerack
|
||||||
|
|
||||||
go 1.25.3
|
go 1.26.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
code.squareroundforest.org/arpio/docreflect v0.0.0-20260113222846-40bd1879753e
|
code.squareroundforest.org/arpio/docreflect v0.0.0-20260113222846-40bd1879753e
|
||||||
@ -11,7 +11,7 @@ require (
|
|||||||
require (
|
require (
|
||||||
code.squareroundforest.org/arpio/bind v0.0.0-20251125135123-0de6ad6e67f2 // indirect
|
code.squareroundforest.org/arpio/bind v0.0.0-20251125135123-0de6ad6e67f2 // indirect
|
||||||
code.squareroundforest.org/arpio/html v0.0.0-20251103020946-e262eca50ac9 // indirect
|
code.squareroundforest.org/arpio/html v0.0.0-20251103020946-e262eca50ac9 // indirect
|
||||||
code.squareroundforest.org/arpio/notation v0.0.0-20251101123932-5f5c05ee0239 // indirect
|
code.squareroundforest.org/arpio/notation v0.0.0-20260605114014-7051f4f7fc0e // indirect
|
||||||
code.squareroundforest.org/arpio/textedit v0.0.0-20251209222254-5a3e22b886be // indirect
|
code.squareroundforest.org/arpio/textedit v0.0.0-20251209222254-5a3e22b886be // indirect
|
||||||
code.squareroundforest.org/arpio/textfmt v0.0.0-20251207234108-fed32c8bbe18 // indirect
|
code.squareroundforest.org/arpio/textfmt v0.0.0-20251207234108-fed32c8bbe18 // indirect
|
||||||
golang.org/x/mod v0.27.0 // indirect
|
golang.org/x/mod v0.27.0 // indirect
|
||||||
|
|||||||
2
go.sum
2
go.sum
@ -6,6 +6,8 @@ code.squareroundforest.org/arpio/html v0.0.0-20251103020946-e262eca50ac9 h1:b7vo
|
|||||||
code.squareroundforest.org/arpio/html v0.0.0-20251103020946-e262eca50ac9/go.mod h1:hq+2CENEd4bVSZnOdq38FUFOJJnF3OTQRv78qMGkNlE=
|
code.squareroundforest.org/arpio/html v0.0.0-20251103020946-e262eca50ac9/go.mod h1:hq+2CENEd4bVSZnOdq38FUFOJJnF3OTQRv78qMGkNlE=
|
||||||
code.squareroundforest.org/arpio/notation v0.0.0-20251101123932-5f5c05ee0239 h1:JvLVMuvF2laxXkIZbHC1/0xtKyKndAwIHbIIWkHqTzc=
|
code.squareroundforest.org/arpio/notation v0.0.0-20251101123932-5f5c05ee0239 h1:JvLVMuvF2laxXkIZbHC1/0xtKyKndAwIHbIIWkHqTzc=
|
||||||
code.squareroundforest.org/arpio/notation v0.0.0-20251101123932-5f5c05ee0239/go.mod h1:ait4Fvg9o0+bq5hlxi9dAcPL5a+/sr33qsZPNpToMLY=
|
code.squareroundforest.org/arpio/notation v0.0.0-20251101123932-5f5c05ee0239/go.mod h1:ait4Fvg9o0+bq5hlxi9dAcPL5a+/sr33qsZPNpToMLY=
|
||||||
|
code.squareroundforest.org/arpio/notation v0.0.0-20260605114014-7051f4f7fc0e h1:JqMl2mkKKOnn9f8Lj/p9zxqpzKZCbax24YtDF+oS3mg=
|
||||||
|
code.squareroundforest.org/arpio/notation v0.0.0-20260605114014-7051f4f7fc0e/go.mod h1:GT75JG+e1m38DYfvTCm0pNxvoI4u3hSP1h1l+qe7Png=
|
||||||
code.squareroundforest.org/arpio/textedit v0.0.0-20251209222254-5a3e22b886be h1:hy7tbsf8Fzl0UzBUNXRottKtCg3GvVI7Hmaf28Qoias=
|
code.squareroundforest.org/arpio/textedit v0.0.0-20251209222254-5a3e22b886be h1:hy7tbsf8Fzl0UzBUNXRottKtCg3GvVI7Hmaf28Qoias=
|
||||||
code.squareroundforest.org/arpio/textedit v0.0.0-20251209222254-5a3e22b886be/go.mod h1:nXdFdxdI69JrkIT97f+AEE4OgplmxbgNFZC5j7gsdqs=
|
code.squareroundforest.org/arpio/textedit v0.0.0-20251209222254-5a3e22b886be/go.mod h1:nXdFdxdI69JrkIT97f+AEE4OgplmxbgNFZC5j7gsdqs=
|
||||||
code.squareroundforest.org/arpio/textfmt v0.0.0-20251207234108-fed32c8bbe18 h1:2aa62CYm9ld5SNoFxWzE2wUN0xjVWQ+xieoeFantdg4=
|
code.squareroundforest.org/arpio/textfmt v0.0.0-20251207234108-fed32c8bbe18 h1:2aa62CYm9ld5SNoFxWzE2wUN0xjVWQ+xieoeFantdg4=
|
||||||
|
|||||||
@ -2985,7 +2985,6 @@ func TestMMLFile(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const n = 180
|
const n = 180
|
||||||
|
|
||||||
s, err := openSyntaxFile("doc/example/mml-exp.treerack")
|
s, err := openSyntaxFile("doc/example/mml-exp.treerack")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
@ -2993,7 +2992,6 @@ func TestMMLFile(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
s.Init()
|
s.Init()
|
||||||
|
|
||||||
b, err := os.ReadFile("doc/example/test.mml")
|
b, err := os.ReadFile("doc/example/test.mml")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
|||||||
1482
url_test.go
Normal file
1482
url_test.go
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user