sorted: more tests

Adding this particular case, because I suspect it demonstrates
a problem with postgresql.

Change-Id: Ia1ffe2f0a27dede579ed652b9f614cd69adc4418
This commit is contained in:
mpl 2013-12-21 01:13:42 +01:00
parent 977564f979
commit e687136b36
1 changed files with 6 additions and 0 deletions

View File

@ -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~")