From 4e406a19c4c3c6f18baa0fc1556b9fc31cb9e377 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Tue, 7 Sep 2021 19:38:00 +0100 Subject: uri parse segments --- test/gleam/uri_test.gleam | 26 ++++++++++++-------------- 1 file 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() { -- cgit v1.2.3