Navigation Menu

Skip to content

Commit

Permalink
index-check: add a test for non string case
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Oct 30, 2017
1 parent 7892b26 commit 406b762
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion test/command-line/test-index-check.rb
Expand Up @@ -242,7 +242,7 @@ def test_key
index_check("--method=content"))
end

def test_broken_multiple_column
def test_multiple_column
restore(<<-COMMANDS)
table_create Memos TABLE_HASH_KEY ShortText
column_create Memos content COLUMN_SCALAR Text
Expand All @@ -265,5 +265,28 @@ def test_broken_multiple_column
assert_equal([false, "", "Broken: Terms.memos: <is>\n"],
index_check("--method=content"))
end

def test_number
restore(<<-COMMANDS)
table_create Memos TABLE_HASH_KEY ShortText
column_create Memos score COLUMN_SCALAR Int32
table_create Scores TABLE_PAT_KEY Int32
column_create Scores memos_score \
COLUMN_INDEX \
Memos score
load --table Memos
[
{"_key": "groonga", "score": 10},
{"_key": "mroonga", "score": 9}
]
delete Scores --key 9
COMMANDS

assert_equal([false, "", "Broken: Scores.memos_score: <9>\n"],
index_check("--method=content"))
end
end
end

0 comments on commit 406b762

Please sign in to comment.