Allow more chars in unquoted text formatter output

This commit is contained in:
Dan Buch
2017-06-18 09:48:52 -04:00
parent 85b1699d50
commit 5d67428857
2 changed files with 14 additions and 3 deletions
+13 -2
View File
@@ -28,7 +28,13 @@ func TestQuoting(t *testing.T) {
checkQuoting(false, "abcd")
checkQuoting(false, "v1.0")
checkQuoting(false, "1234567890")
checkQuoting(true, "/foobar")
checkQuoting(false, "/foobar")
checkQuoting(false, "foo_bar")
checkQuoting(false, "foo@bar")
checkQuoting(false, "foobar^")
checkQuoting(false, "+/-_^@f.oobar")
checkQuoting(true, "foobar$")
checkQuoting(true, "&foobar")
checkQuoting(true, "x y")
checkQuoting(true, "x,y")
checkQuoting(false, errors.New("invalid"))
@@ -38,7 +44,12 @@ func TestQuoting(t *testing.T) {
tf.QuoteCharacter = "`"
checkQuoting(false, "")
checkQuoting(false, "abcd")
checkQuoting(true, "/foobar")
checkQuoting(false, "/foobar")
checkQuoting(false, "foo_bar")
checkQuoting(false, "foo@bar")
checkQuoting(false, "foobar^")
checkQuoting(true, "foobar$")
checkQuoting(true, "&foobar")
checkQuoting(true, errors.New("invalid argument"))
// Test for multi-character quotes.