aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2021-09-07 19:38:00 +0100
committerLouis Pilfold <louis@lpil.uk>2021-09-07 19:38:00 +0100
commit4e406a19c4c3c6f18baa0fc1556b9fc31cb9e377 (patch)
tree2921efd60e431b9f49075ca08b522be7c5fb9e0f
parent140e439b4759f51e320cffd25050981a6b593a9e (diff)
downloadgleam_stdlib-4e406a19c4c3c6f18baa0fc1556b9fc31cb9e377.tar.gz
gleam_stdlib-4e406a19c4c3c6f18baa0fc1556b9fc31cb9e377.zip
uri parse segments
-rw-r--r--test/gleam/uri_test.gleam26
1 files changed, 12 insertions, 14 deletions
diff --git a/test/gleam/uri_test.gleam b/test/gleam/uri_test.gleam
index 1c8e0c1..779c29e 100644
--- a/test/gleam/uri_test.gleam
+++ b/test/gleam/uri_test.gleam
@@ -401,20 +401,18 @@ pub fn percent_decode_consistency_test() {
should.equal(parsed, [#(decoded_key, decoded_value)])
}
-if erlang {
- pub fn parse_segments_test() {
- should.equal(uri.path_segments("/"), [])
- should.equal(uri.path_segments("/weebl/bob"), ["weebl", "bob"])
- should.equal(uri.path_segments("////"), [])
- should.equal(uri.path_segments("/weebl//bob"), ["weebl", "bob"])
-
- should.equal(uri.path_segments("/."), [])
- should.equal(uri.path_segments("/.weebl"), [".weebl"])
-
- should.equal(uri.path_segments("/../bob"), ["bob"])
- should.equal(uri.path_segments("../bob"), ["bob"])
- should.equal(uri.path_segments("/weebl/../bob"), ["bob"])
- }
+pub fn parse_segments_test() {
+ should.equal(uri.path_segments("/"), [])
+ should.equal(uri.path_segments("/weebl/bob"), ["weebl", "bob"])
+ should.equal(uri.path_segments("////"), [])
+ should.equal(uri.path_segments("/weebl//bob"), ["weebl", "bob"])
+
+ should.equal(uri.path_segments("/."), [])
+ should.equal(uri.path_segments("/.weebl"), [".weebl"])
+
+ should.equal(uri.path_segments("/../bob"), ["bob"])
+ should.equal(uri.path_segments("../bob"), ["bob"])
+ should.equal(uri.path_segments("/weebl/../bob"), ["bob"])
}
pub fn origin1_test() {