# Standard set of
{
# Single bare keyword
push @tests, [
'チーズ',
'"チーズ"',
];
# Multiple bare keywords splited by ascii space
push @tests, [
'チーズ ピザ',
'"チーズ" "ピザ"',
];
push @tests, [
'ピザ チーズ',
'"チーズ" "ピザ"',
];
push @tests, [
'チーズ ピザ',
'"チーズ" "ピザ"',
];
# Multiple bare keywords splited by utf8 space
push @tests, [
'チーズ ピザ',
'"チーズ" "ピザ"',
];
push @tests, [
'ピザ チーズ',
'"チーズ" "ピザ"',
];
push @tests, [
'チーズ ピザ',
'"チーズ" "ピザ"',
];
# Quoted strings
push @tests, [
'"チーズ ピザ"',
'"チーズ ピザ"',
];
push @tests, [
'"チーズ ピザ" 食料',
'"チーズ ピザ" "食料"',
];
push @tests, [
'"チーズ ピザ" "ハワイアン ピザ"',
'"チーズ ピザ" "ハワイアン ピザ"',
];
# Malformed quoted strings
push @tests, [
'"チーズ ピザ',
'"チーズ ピザ"',
];
push @tests, [
'"チーズ ピザ "ハワイアン',
'"チーズ ピザ " "ハワイアン"',
];
push @tests, [
'チーズ "ピザ',
'"チーズ" "ピザ"',
];
push @tests, [
'チーズ "ピザ パイ',
'"チーズ" "ピザ パイ"',
];
push @tests, [
'チーズ"ピザ',
'"チーズ" "ピザ"',
];
# Specific field matching
push @tests, [
'title:チーズ',
'@name "チーズ"',
];
push @tests, [
'title:チーズ ピザ',
'"ピザ" @name "チーズ"',
];
push @tests, [
'ピザ title:チーズ',
'"ピザ" @name "チーズ"',
];
push @tests, [
'title:"チーズ ピザ"',
'@name "チーズ ピザ"',
];
push @tests, [
'title:チーズ title:ピザ',
'@name "チーズ" "ピザ"',
];
push @tests, [
'content:チーズ',
'@(body,body_extended) "チーズ"',
];
push @tests, [
'content:チーズ title:ピザ',
'@(body,body_extended) "チーズ" @name "ピザ"',
];
push @tests, [
'title:ピザ incorrectfield:チーズ',
'@name "ピザ"',
];
push @tests, [
'title:ピザ:パイ',
'@name "ピザ:パイ"',
];
push @tests, [
'title:"ピザ:パイ"',
'@name "ピザ:パイ"',
];
# Negation
push @tests, [
'-チーズ',
"<die>",
];
push @tests, [
'ピザ -チーズ',
'"ピザ" -"チーズ"',
];
push @tests, [
'-ピザ チーズ',
'"チーズ" -"ピザ"',
];
push @tests, [
'-ピザ -チーズ',
'<die>',
];
push @tests, [
'ピザ -title:チーズ',
'"ピザ" @name -"チーズ"',
];
push @tests, [
'ピザ -content:チーズ',
'"ピザ" @(body,body_extended) -"チーズ"',
];
push @tests, [
'-title:ピザ',
'<die>',
];
push @tests, [
'-title:"ピザ"',
'<die>',
];
push @tests, [
'title:ピザ -title:ピザ', # This is a useless query, but syntactically valid.
'@name "ピザ" -"ピザ"',
];
# Malformed negation and literal -
push @tests, [
'ピザ-',
'"ピザ-"',
];
push @tests, [
'ピザ -',
'"ピザ"',
];
push @tests, [
'ピザ-パイ',
'"ピザ-パイ"',
];
push @tests, [
'ピザ- パイ',
'"パイ" "ピザ-"',
];
push @tests, [
'"ピザ-"',
'"ピザ-"',
];
# Other pathological cases
push @tests, [
'',
'',
];
push @tests, [
'title:',
'"title:"',
];
push @tests, [
'"こんにちは 世界。 この 文には "1つだけ クォートで 囲まれた副文" がある。 この文のなかにね。"',
'" この文のなかにね。" "1つ" "こんにちは 世界。 この 文には " "クォートで 囲まれた" "副文"',
];
push @tests, [
'"こんにちは "世界"',
'"こんにちは " "世界"',
];
push @tests, [
'-',
'<die>',
];
}
Recent Comments