From 4ba4d0097a929af934958aedc052e8302b3a484f Mon Sep 17 00:00:00 2001
From: Manni Wood <manni.lee.wood@gmail.com>
Date: Sun, 13 Nov 2016 18:08:36 -0500
Subject: [PATCH] Gets formatting correct for tricky ingoing string

...but broken for outgoing string; must fix next
---
 values_test.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/values_test.go b/values_test.go
index 4cbe40ea..01e5114b 100644
--- a/values_test.go
+++ b/values_test.go
@@ -645,7 +645,7 @@ func TestNullX(t *testing.T) {
 
 func assertAclItemSlicesEqual(t *testing.T, query, scan []pgx.AclItem) {
 	if !reflect.DeepEqual(query, scan) {
-		t.Errorf("failed to encode aclitem[]\n EXPECTED: %v\n ACTUAL: %v", query, scan)
+		t.Errorf("failed to encode aclitem[]\n EXPECTED: %d %v\n ACTUAL:   %d %v", len(query), query, len(scan), scan)
 	}
 }
 
@@ -671,6 +671,9 @@ func TestAclArrayDecoding(t *testing.T) {
 		{
 			[]pgx.AclItem{"=r/postgres", "postgres=arwdDxt/postgres"},
 		},
+		{
+			[]pgx.AclItem{"=r/postgres", "postgres=arwdDxt/postgres", `postgres=arwdDxt/\" tricky\, ' \} \"\" \\ test user \"`},
+		},
 	}
 	for i, tt := range tests {
 		err := conn.QueryRow(sql, tt.query).Scan(&scan)