aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/prelude/semantics/test/CJKTestCase.java
blob: d5065fbfe3b0efa88e2b07440467eb40f3624286 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.semantics.test;

import org.junit.jupiter.api.Test;

/**
 * Tests that using rule bases containing cjk characters work
 *
 * @author bratseth
 */
public class CJKTestCase extends RuleBaseAbstractTestCase {

    public CJKTestCase() {
        super("cjk.sr");
    }

    @Test
    void testIt() {
        assertSemantics("\u7d22a", "a\u7d22");
        assertSemantics("\u7d22a", "\u7d22a");
        assertSemantics("brand:\u7d22\u5c3c", "\u7d22\u5c3c");
        assertSemantics("brand:\u60e0\u666e", "\u60e0\u666e");
        assertSemantics("brand:\u4f73\u80fd", "\u4f73\u80fd");
        assertSemantics("AND brand:\u4f73\u80fd \u7d22a", "\u4f73\u80fd a\u7d22");
        assertSemantics("\u4f73\u80fd\u7d22\u5c3c", "\u4f73\u80fd\u7d22\u5c3c");
    }

}