From e687136b3649629196e3e1131b33ab69c96e3c1f Mon Sep 17 00:00:00 2001 From: mpl Date: Sat, 21 Dec 2013 01:13:42 +0100 Subject: [PATCH] sorted: more tests Adding this particular case, because I suspect it demonstrates a problem with postgresql. Change-Id: Ia1ffe2f0a27dede579ed652b9f614cd69adc4418 --- pkg/sorted/kvtest/kvtest.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/sorted/kvtest/kvtest.go b/pkg/sorted/kvtest/kvtest.go index 87ccc2e8d..058a98a32 100644 --- a/pkg/sorted/kvtest/kvtest.go +++ b/pkg/sorted/kvtest/kvtest.go @@ -62,6 +62,12 @@ func TestSorted(t *testing.T, kv sorted.KeyValue) { testEnumerate(t, kv, "d", "") testEnumerate(t, kv, "d", "e") + // Verify that < comparison works identically for all DBs (because it is affected by collation rules) + // http://postgresql.1045698.n5.nabble.com/String-comparison-and-the-SQL-standard-td5740721.html + set("foo|abc", "foo|abcv") + testEnumerate(t, kv, "foo|", "", "foo|abcv") + testEnumerate(t, kv, "foo|", "foo}", "foo|abcv") + // Verify that the value isn't being used instead of the key in the range comparison. set("y", "x:foo") testEnumerate(t, kv, "x:", "x~")