escapetest

package
v0.0.0-...-7272a43 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinHighSurrogate          = rune(0xd800)
	MaxHighSurrogate          = rune(0xdbff)
	MinLowSurrogate           = rune(0xdc00)
	MaxLowSurrogate           = rune(0xdfff)
	SmallestSurrogate         = rune(0xd800 + 0xdc00)
	LargestSurrogate          = rune(0xdbff + 0xdfff)
	MaxBMPCodePoint           = rune(65535)
	MinSupplementaryCodePoint = rune(65536)
	MinCodePoint              = rune(0)
	MaxCodePoint              = rune(1114111)
)

Common unicode literals.

Variables

This section is empty.

Functions

func AssertBasic

func AssertBasic(t *testing.T, escaper escape.Escaper)

AssertBasic asserts common expected behaviour of escapers.

func AssertBasicURLEscaper

func AssertBasicURLEscaper(t *testing.T, e escape.Escaper)

AssertBasicURLEscaper asserts common expected behaviour of URI escapers.

func AssertBasicURLEscaperExceptPercent

func AssertBasicURLEscaperExceptPercent(t *testing.T, e escape.Escaper)

AssertBasicURLEscaperExceptPercent asserts common expected behaviour of URI escapers. You should call assertBasicURLEscaper() unless the escaper explicitly does not escape '%'.

func AssertEscapingByte

func AssertEscapingByte(t *testing.T, e escape.Escaper, want string, c byte)

AssertEscapingByte asserts that an escaper escapes the given character into the expected string.

func AssertEscapingRune

func AssertEscapingRune(t *testing.T, e escape.Escaper, want string, r rune)

AssertEscapingRune asserts that an runes.Escaper escapes the given rune into the expected string.

func AssertEscapingUnicode

func AssertEscapingUnicode(t *testing.T, e escape.Escaper, want string, hi, lo rune)

AssertEscapingUnicode asserts that a Unicode escaper escapes the given hi/lo surrogate pair into the expected string.

func AssertUnescapedByte

func AssertUnescapedByte(t *testing.T, e escape.Escaper, c byte)

AssertUnescapedByte asserts that an escaper does not escape the given character.

func AssertUnescapedRune

func AssertUnescapedRune(t *testing.T, e escape.Escaper, r rune)

AssertUnescapedRune asserts that an escaper does not escape the given character.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL