go /
text /
a8b38433e35b65ba247bb267317037dee1b70cea internal/export/idna: sanitize errors
- Documented that ToASCII and ToUnicode always return some IDN.
- Label length checking disabled by default
(most browsers seem to do this)
- Refactored test logic
- Associate (internal) error codes with errors. This allows:
- more accurate testing
- better documentation
- makes it easier in the future to have options to disable
specific tests
- Added tests for very esoteric cases that often display
very different behavior between browsers.
Change-Id: Ia70335212f1089f280653c2b7bea9f769171ae1c
Reviewed-on: https://go-review.googlesource.com/31470
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
3 files changed