Opened 3 months ago

Closed 2 months ago

#14377 closed bug (fixed)

BUrl unit tests fail

Reported by: KapiX Owned by: apl-haiku
Priority: normal Milestone: Unscheduled
Component: Kits/Network Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Repro: UnitTester UrlTest

- FAILURES: 3
    TestCaller UrlTest::ParseTest: Expected: http://user:pass@www.foo.com:80/path?, but was: http://user:pass@www.foo.com:80/path.
    TestCaller UrlTest::TestIsValid: Set to an invalid host
    TestCaller UrlTest::RelativeUriTest: Expected: foo:/c, but was: foo:a/c. Base: foo:a/b Relative: ../c
  • ParseTest: // Test that parsing a valid URL and converting back to string doesn't alter it [1]
  • TestIsValid: looks like assert condition is reversed [2]
  • RelativeUriTest: // However, foo:/c is what the RFC says we should get. [3]

[1] https://git.haiku-os.org/haiku/tree/src/tests/kits/net/service/UrlTest.cpp#n31

[2] https://git.haiku-os.org/haiku/tree/src/tests/kits/net/service/UrlTest.cpp#n71

[3] https://git.haiku-os.org/haiku/tree/src/tests/kits/net/service/UrlTest.cpp#n271

Change History (4)

comment:1 Changed 3 months ago by KapiX

Oops, correction: TestIsValid condition is OK, it appears BUrl considers "<invalid>" URL valid.

comment:2 Changed 3 months ago by pulkomandy

Owner: changed from nobody to apl-haiku
Status: newassigned

Reassigning to Andrew as he rewrote the parser, but IIRC the tests were still working back then. I'll try to have a look too.

comment:3 Changed 3 months ago by apl-haiku

Hi; I am a bit busy at the moment but will see what I can do. I'm looking at Set to an invalid host first.

comment:4 Changed 2 months ago by waddlesplash

Resolution: fixed
Status: assignedclosed

Last fixes merged in hrev52332. Thanks, apl!

Note: See TracTickets for help on using tickets.