Kouhei Sutou
null+****@clear*****
Sun Feb 21 16:37:06 JST 2016
Kouhei Sutou 2016-02-21 16:37:06 +0900 (Sun, 21 Feb 2016) New Revision: 46d9f552636ac2f439c0cd975701395af9ba5bcf https://github.com/ranguba/rroonga/commit/46d9f552636ac2f439c0cd975701395af9ba5bcf Message: test: add a test for :max_records option Modified files: test/test-table-dumper.rb Modified: test/test-table-dumper.rb (+29 -0) =================================================================== --- test/test-table-dumper.rb 2016-02-21 16:36:43 +0900 (2e30837) +++ test/test-table-dumper.rb 2016-02-21 16:37:06 +0900 (cb3f96a) @@ -564,4 +564,33 @@ load --table Products COMMAND end end + + class MaxRecordsTest < self + def setup + Groonga::Schema.define do |schema| + schema.create_table("Products", + :type => :hash, + :key_type => "ShortText") do |table| + end + end + end + + def products + Groonga["Products"] + end + + def test_small + products.add("Groonga") + products.add("Mroonga") + products.add("Rroonga") + assert_equal(<<-COMMAND, dump("Products", :max_records => 2)) +load --table Products +[ +["_key"], +["Groonga"], +["Mroonga"] +] + COMMAND + end + end end -------------- next part -------------- HTML����������������������������...Download