oficina / memoria Public

Clone
git clone https://amadan.net/oficina/memoria

Plain git — no account needed to clone.

Download

Download this file

1package memoria
2
3import "testing"
4
5func TestPlausibleAddressIsShapeOnly(t *testing.T) {
6 for v, want := range map[string]bool{
7 "paul@example.com": true, " paul@example.com ": true, "a@b.co": true,
8 "": false, "paul@": false, "@example.com": false, "paul": false,
9 "paul@localhost": true, `"a@b"@example.com`: true,
10 "pa ul@example.com": false, "paul@example.com@": false,
11 } {
12 if got := plausibleAddress(v); got != want {
13 t.Errorf("plausibleAddress(%q) = %v, want %v", v, got, want)
14 }
15 }
16}
17