diff options
author | Adam Kocoloski <adam@cloudant.com> | 2011-10-04 13:11:12 -0700 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2011-10-04 13:11:12 -0700 |
commit | da7284ed2844926c7df0efef12ba30d8e2e6d039 (patch) | |
tree | 10fa2d5cf35bfae4d48fc632924cec98ee02a22a /rel/overlay/share/www/script/test/view_collation_raw.js | |
parent | b57aadd742e4f8cc925ba4f005ae658c43a7c5b4 (diff) | |
parent | 4e19639a64d3033e1cc7c22a0b7404d277643c78 (diff) |
Merge pull request #67 from cloudant/12645-merge_latest_1.1.x
Diffstat (limited to 'rel/overlay/share/www/script/test/view_collation_raw.js')
-rw-r--r-- | rel/overlay/share/www/script/test/view_collation_raw.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/rel/overlay/share/www/script/test/view_collation_raw.js b/rel/overlay/share/www/script/test/view_collation_raw.js index 31624cdb..779f7eb8 100644 --- a/rel/overlay/share/www/script/test/view_collation_raw.js +++ b/rel/overlay/share/www/script/test/view_collation_raw.js @@ -76,12 +76,19 @@ couchTests.view_collation_raw = function(debug) { } } T(db.save(designDoc).ok); + + // Confirm that everything collates correctly. var rows = db.view("test/test").rows; for (i=0; i<values.length; i++) { T(equals(rows[i].key, values[i])); } - // everything has collated correctly. Now to check the descending output + // Confirm that couch allows raw semantics in key ranges. + rows = db.view("test/test", {startkey:"Z", endkey:"a"}).rows; + TEquals(1, rows.length); + TEquals("a", rows[0].key); + + // Check the descending output. rows = db.view("test/test", {descending: true}).rows; for (i=0; i<values.length; i++) { T(equals(rows[i].key, values[values.length - 1 -i])); |