Skip to content

mime: ParseMediaType new tests that expects different return #21683

@guilhermebr

Description

@guilhermebr

I created a change (https://go-review.googlesource.com/c/go/+/59950)
that adds missing tests from http://greenbytes.de/tech/tc2231/
(see this TODO: https://github.com/golang/go/blob/master/src/mime/mediatype_test.go#L142)

But there are 5 tests who I not included from this site because expects a different return that is currently returned by ParseMediaType function, and I don't know if is better to fix this or not...

Four of them is related to backslash escape:

And the last is about putting encode inside quotes:

https://play.golang.org/p/wMsDdfBeh3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions