...
1 package db
2
3 import (
4 "testing"
5
6 "github.com/letsencrypt/boulder/test"
7 )
8
9 func TestValidMariaDBUnquotedIdentifier(t *testing.T) {
10 test.AssertError(t, validMariaDBUnquotedIdentifier("12345"), "expected error for 12345")
11 test.AssertError(t, validMariaDBUnquotedIdentifier("12345e"), "expected error for 12345e")
12 test.AssertError(t, validMariaDBUnquotedIdentifier("1e10"), "expected error for 1e10")
13 test.AssertError(t, validMariaDBUnquotedIdentifier("foo\\bar"), "expected error for foo\\bar")
14 test.AssertError(t, validMariaDBUnquotedIdentifier("zoom "), "expected error for identifier ending in space")
15 test.AssertNotError(t, validMariaDBUnquotedIdentifier("hi"), "expected no error for 'hi'")
16 }
17
View as plain text