func TestHTMLBasic(t *testing.T) {
	mangler := mangle.Mangle{Corpus: corpus, Secret: salta}
	for _, tt := range tests {
		r := strings.NewReader(tt.in)
		w := new(bytes.Buffer)
		err := mangler.MangleHTML(r, w)
		if err != nil {
			t.Errorf("MangleHTML(%q) error %q", tt.in, err)
		}
		out := w.String()
		if out != tt.out {
			t.Errorf("MangleHTML(%q) => %q, want %q", tt.in, out, tt.out)
		}
	}
}
Tests HTML based interface with basic strings.
package mangle_test
import (
	"bufio"
	"bytes"
	"github.com/grugnog/mangle"
	"strings"
	"testing"
)
var corpus = initTestCorpus()
var salta = "123456789012345678901234567890"
var saltb = "123456789012345678901234567890-"
func initTestCorpus() [255][]string {
	words := "a b c dd ee ff ggg hhh iii jjjj kkkk llll mmmmm nnnnn ooooo pppppp qqqqqq rrrrrr sssssss ttttttt uuuuuuu"
	reader := strings.NewReader(words)
	scanner := bufio.NewScanner(reader)
	corpus, _ := mangle.BuildCorpus(scanner)
	return corpus
}
var tests = []struct {
	in  string
	out string
}{
	{"A", "B"},
	{"Jumping", "Ttttttt"},
	{"The quick brown fox\njumps over the lazy dog", "Iii ooooo ooooo iii\nooooo jjjj iii llll hhh"},
	{"So funny, ROFL.", "Dd ooooo, KKKK."},
	{"+1 (123) 456-7890", "+c (iii) iii-jjjj"},
	{"Antidisestablishmentarianism", "Sssssss                     "},
	{"00123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜøØƒáíóúñÑðÐÊËÈıÍÎÏÌÓßÔÒõÕµþÞÚÛÙýÝ123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜøØƒáíóúñÑðÐÊËÈıÍÎÏÌÓßÔÒõÕµþÞÚÛÙýÝ", "uuuuuuu                                                                                                                                                                                                                                             "},
	{"是一个专为语文教学而设计的电脑软件。在当今这个电脑时代，＂电脑辅助教学＂", "uuuuuuu          。ttttttt  ，＂rrrrrr＂"},
	{"よばれる　－　呼ばれる りゅうは、ごく　－　理由は、", "kkkk　－　llll jjjj、dd　－　ggg、"},
	{"авианосцы 'Уинсон' и 'Мидуэй' приблизились", "sssssss   'Pppppp' b 'Qqqqqq' uuuuuuu     "},
	{"صدر الدين عيني", "hhh ooooo jjjj"},
}
func TestStrings(t *testing.T) {
	mangler := mangle.Mangle{Corpus: corpus, Secret: salta}
	for _, tt := range tests {
		out := mangler.MangleString(tt.in)
		if out != tt.out {
			t.Errorf("MangleString(%s) => %q, want %q", tt.in, out, tt.out)
		}
	}
}
func TestIO(t *testing.T) {
	mangler := mangle.Mangle{Corpus: corpus, Secret: salta}
	for _, tt := range tests {
		r := strings.NewReader(tt.in)
		w := new(bytes.Buffer)
		err := mangler.MangleIO(r, w)
		if err != nil {
			t.Errorf("MangleIO(%q) error %q", tt.in, err)
		}
		out := w.String()
		if out != tt.out {
			t.Errorf("MangleIO(%q) => %q, want %q", tt.in, out, tt.out)
		}
	}
}