1 |
|
2 | import { results, lines } from './swuquery-results';
|
3 |
|
4 | const signtext = '๐ ๑๑๑ฅ๑ฉ๐ ๐ค๐คฉ๑ฉ๐ฃต๐ค๑๐ค๐ฃค๑ฅ๐ค๐ค๑๐ฃฎ๐ฃญ ๐ ๑ข๑๑ก๑ฅ๑ต๐ ๐ค๐คฌ๑๐ค๐ฃบ๑ข๐ค๐ฃป๑ฅ๐ค๐ค๑ต๐ค๐ฃ๑ก๐ฃฑ๐ฃธ ๐ ๑
จ๑๑๐ ๐ค๐ค๑๐ฃท๐ค๑
จ๐ฃผ๐ค๑๐ฃณ๐ฃฎ ๑๐ฃข๐ค ๐ ๑๐ ๐ค๐ค๑๐ฃพ๐ฃท ๐ ๑ข๑ท๑ก๑ฆ๐ ๐คฉ๐ค๑ข๐ฃข๐ฃฑ๑ท๐ฃฌ๐ค๑ก๐ค๐ฃฝ๑ฆ๐ค๐ค ๑ก๐ฃก๐ค ๐ ๑ก๐ ๐ค๐ค๑ก๐ฃฟ๐ฃท ๐ ๑๑ฉ๑๐ ๐คฎ๐ค๑๐ฃด๐ฃด๑๐ค๐ฃป๑ฉ๐ค๐ฃ ๐ ๑๑๑ก๑ฉก๑ฉฝ๑ก๑บ๑๑๐ ๐คฒ๐คก๑๐ฃจ๐ค๑๐ค๐ค๑๐ฃด๐ฃด๑ก๐ค๐ฃถ๑ก๐ฃฉ๐ฃถ๑ฉก๐ค๐ฃข๑ฉฝ๐ฃ๐ฃก๑๐ฃด๐ฃด๑บ๐ฃฝ๐ฃ ๑ก๐ฃก๐ค ๐ ๑ก๐ ๐ค๐ค๑ก๐ฃฟ๐ฃท ๐ ๑๑ฉ๑๐ ๐คฎ๐ค๑๐ฃด๐ฃด๑๐ค๐ฃป๑ฉ๐ค๐ฃ ๐ ๑๑ป๑๑๐ ๐คฃ๐ค๑ป๐ค๐ค๑๐ฃน๐ค๑๐ค๐ฃต๑๐ฃฉ๐ฃฝ ๐ ๑ก๑ฅ๑๐ ๐คก๐ค๑๐ค๐ฃธ๑ก๐ฃซ๐ฃธ๑ฅ๐ฃป๐ฃท ๐ ๑๑๑ฟ
๑๐ ๐คฃ๐ค๑๐ค
๐ฃฏ๑๐ค
๐ฃฝ๑๐ฃช๐ฃฎ๑ฟ
๐ค
๐ค ๑๐ฃข๐ค ๐ ๑ข๑ณ๑๑๐ ๐คฌ๐ค๑ข๐ค๐ฃต๑๐ฃก๐ฃด๑๐ฃค๐ฃต๑ณ๐ฃฟ๐ฃผ ๐ ๑๑๑ ฅ๑กฉ๐ ๐ค๐คช๑กฉ๐ฃท๐ค๑๐ค๐ฃก๑ ฅ๐ค๐ค๑๐ฃฏ๐ฃช ๐ ๑ง๑ง๑ฟ
๑ฟ๑ธฅ๐ ๐คจ๐ค๑ฟ๐ฃญ๐ค๑ง๐ค๐ฃฑ๑ง๐ฃฅ๐ฃฑ๑ฟ
๐ค๐ค๑ธฅ๐ฃฟ๐ค ๑๐ฃข๐ค ๐ ๑
ก๑ธ๑จ๑จ๑๑๑ฅ๑ต๐ ๐คค๐คธ๑ธ๐ฃจ๐ฃ๑๐ค๐ค๑๐ฃณ๐ค๑
ก๐ฃผ๐ฃฆ๑ต๐ฃฑ๐ฃบ๑จ๐ค๐ฃ๑ฅ๐ค๐ฃป๑จ๐ค๐ฃ ๐ ๑นธ๑ฆ๑พ๐ ๐คญ๐คฅ๑นธ๐ฃ๐ฃฆ๑พ๐ค๐ค๑ฆ๐ฃฝ๐ฃพ ๐ ๐ค๐ค๑๐ฃน๐ค๑๐ฃต๐ฃฑ ๑ก๐ฃก๐ค ๐ ๑
๑
๐ ๐ค๐ค๑
๐ฃฟ๐ฃณ๑
๐ฃพ๐ค ๑๐ฃข๐ค ๐ ๐คฆ๐ค๑ตก๐ฃง๐ฃท๑
๐ค๐ค๑ก๐ค๐ฃธ ๑ก๐ฃก๐ค ๐ ๐คง๐คฌ๑
ฉฑ๐ค๐ค๑ณก๐ฃด๐ฃด ๐ ๐คผ๐ค๑๐ฃณ๐ฃถ๑๐ค๐ฃถ๑๐ค๐ฃต๑๐ฃ๐ฃต๑ก๐ค๐ค ๑ก๐ฃก๐ค ๐ ๑ฃ๑ซ๑๑ก๐ ๐ค๐ค๑ก๐ฃน๐ฃฏ๑ฃ๐ค๐ค๑ซ๐ฃฑ๐ค๑๐ฃฟ๐ฃฟ ๐ ๑ก๑ฉ๑๑๑ฉ๐ ๐ค๐ฅ๑ฉ๐ค๐คต๑ก๐ค๐ค๑๐ค๐คฅ๑๐ฃฐ๐ค๑ฉ๐ฃด๐ฃด ๑ก๐ฃก๐ค ๐ ๐คน๐คฐ๑
ฐ๐ฃ๐ฃฃ๑
๐ฃด๐ฃ๑๐ค๐ฃบ๑๐ฃฅ๐ฃผ๑
ข๐ค ๐ค๑
๐ฃบ๐ค ๐ ๑๑๑ ฉ๑กญ๑ธก๐ ๐คฆ๐คฌ๑๐ค๐ค๑๐ฃฅ๐ค๑กญ๐ฃฏ๐ฃจ๑ ฉ๐ค๐ฃต๑ธก๐ค๐ฃ ๑๐ฃข๐ค ๐ ๐คฆ๐ค๑ตก๐ฃง๐ฃท๑
๐ค๐ค๑ก๐ค๐ฃธ ๐ ๑ง๑ง๑ฟ
๑ฟ๑ธฅ๐ ๐คจ๐ค๑ฟ๐ฃญ๐ค๑ง๐ค๐ฃฑ๑ง๐ฃฅ๐ฃฑ๑ฟ
๐ค๐ค๑ธฅ๐ฃฟ๐ค ๑ก๐ฃก๐ค ๐ ๑๑๑ ฅ๑กฉ๐ ๐ค๐คช๑กฉ๐ฃท๐ค๑๐ค๐ฃก๑ ฅ๐ค๐ค๑๐ฃฏ๐ฃช ๐ ๑
ก๑๑จฌ๐ ๐ค๐คฅ๑๐ฃถ๐ฃฆ๑
ก๐ฃพ๐ฃต๑จฌ๐ฃถ๐ค ๐ ๑
ฑ๑
น๑ฅ๑ต๑ต๐ ๐คข๐ฅ๑
ฑ๐ค๐คค๑
น๐ฃฏ๐คค๑ฅ๐ค๐คน๑ต๐ฃฉ๐คน๑ต๐ฃด๐ฃฏ ๑๐ฃข๐ค';
|
5 |
|
6 | const signlines = `๐ ๑๑๑ฅ๑ฉ๐ ๐ค๐คฉ๑ฉ๐ฃต๐ค๑๐ค๐ฃค๑ฅ๐ค๐ค๑๐ฃฎ๐ฃญ this line here
|
7 | ๐ ๑ข๑๑ก๑ฅ๑ต๐ ๐ค๐คฌ๑๐ค๐ฃบ๑ข๐ค๐ฃป๑ฅ๐ค๐ค๑ต๐ค๐ฃ๑ก๐ฃฑ๐ฃธ this line here
|
8 | ๐ ๑
จ๑๑๐ ๐ค๐ค๑๐ฃท๐ค๑
จ๐ฃผ๐ค๑๐ฃณ๐ฃฎ this line here
|
9 | ๑๐ฃข๐ค this line here
|
10 | ๐ ๑๐ ๐ค๐ค๑๐ฃพ๐ฃท this line here
|
11 | ๐ ๑ข๑ท๑ก๑ฆ๐ ๐คฉ๐ค๑ข๐ฃข๐ฃฑ๑ท๐ฃฌ๐ค๑ก๐ค๐ฃฝ๑ฆ๐ค๐ค this line here
|
12 | ๑ก๐ฃก๐ค this line here
|
13 | ๐ ๑ก๐ ๐ค๐ค๑ก๐ฃฟ๐ฃท this line here
|
14 | ๐ ๑๑ฉ๑๐ ๐คฎ๐ค๑๐ฃด๐ฃด๑๐ค๐ฃป๑ฉ๐ค๐ฃ this line here
|
15 | ๐ ๑๑๑ก๑ฉก๑ฉฝ๑ก๑บ๑๑๐ ๐คฒ๐คก๑๐ฃจ๐ค๑๐ค๐ค๑๐ฃด๐ฃด๑ก๐ค๐ฃถ๑ก๐ฃฉ๐ฃถ๑ฉก๐ค๐ฃข๑ฉฝ๐ฃ๐ฃก๑๐ฃด๐ฃด๑บ๐ฃฝ๐ฃ this line here
|
16 | ๑ก๐ฃก๐ค this line here
|
17 | ๐ ๑ก๐ ๐ค๐ค๑ก๐ฃฟ๐ฃท this line here
|
18 | ๐ ๑๑ฉ๑๐ ๐คฎ๐ค๑๐ฃด๐ฃด๑๐ค๐ฃป๑ฉ๐ค๐ฃ this line here
|
19 | ๐ ๑๑ป๑๑๐ ๐คฃ๐ค๑ป๐ค๐ค๑๐ฃน๐ค๑๐ค๐ฃต๑๐ฃฉ๐ฃฝ this line here
|
20 | ๐ ๑ก๑ฅ๑๐ ๐คก๐ค๑๐ค๐ฃธ๑ก๐ฃซ๐ฃธ๑ฅ๐ฃป๐ฃท this line here
|
21 | ๐ ๑๑๑ฟ
๑๐ ๐คฃ๐ค๑๐ค
๐ฃฏ๑๐ค
๐ฃฝ๑๐ฃช๐ฃฎ๑ฟ
๐ค
๐ค this line here
|
22 | ๑๐ฃข๐ค this line here
|
23 | ๐ ๑ข๑ณ๑๑๐ ๐คฌ๐ค๑ข๐ค๐ฃต๑๐ฃก๐ฃด๑๐ฃค๐ฃต๑ณ๐ฃฟ๐ฃผ this line here
|
24 | ๐ ๑๑๑ ฅ๑กฉ๐ ๐ค๐คช๑กฉ๐ฃท๐ค๑๐ค๐ฃก๑ ฅ๐ค๐ค๑๐ฃฏ๐ฃช this line here
|
25 | ๐ ๑ง๑ง๑ฟ
๑ฟ๑ธฅ๐ ๐คจ๐ค๑ฟ๐ฃญ๐ค๑ง๐ค๐ฃฑ๑ง๐ฃฅ๐ฃฑ๑ฟ
๐ค๐ค๑ธฅ๐ฃฟ๐ค this line here
|
26 | ๑๐ฃข๐ค this line here
|
27 | ๐ ๑
ก๑ธ๑จ๑จ๑๑๑ฅ๑ต๐ ๐คค๐คธ๑ธ๐ฃจ๐ฃ๑๐ค๐ค๑๐ฃณ๐ค๑
ก๐ฃผ๐ฃฆ๑ต๐ฃฑ๐ฃบ๑จ๐ค๐ฃ๑ฅ๐ค๐ฃป๑จ๐ค๐ฃ this line here
|
28 | ๐ ๑นธ๑ฆ๑พ๐ ๐คญ๐คฅ๑นธ๐ฃ๐ฃฆ๑พ๐ค๐ค๑ฆ๐ฃฝ๐ฃพ this line here
|
29 | ๐ ๐ค๐ค๑๐ฃน๐ค๑๐ฃต๐ฃฑ this line here
|
30 | ๑ก๐ฃก๐ค this line here
|
31 | ๐ ๑
๑
๐ ๐ค๐ค๑
๐ฃฟ๐ฃณ๑
๐ฃพ๐ค this line here
|
32 | ๑๐ฃข๐ค this line here
|
33 | ๐ ๐คฆ๐ค๑ตก๐ฃง๐ฃท๑
๐ค๐ค๑ก๐ค๐ฃธ this line here
|
34 | ๑ก๐ฃก๐ค this line here
|
35 | ๐ ๐คง๐คฌ๑
ฉฑ๐ค๐ค๑ณก๐ฃด๐ฃด this line here
|
36 | ๐ ๐คผ๐ค๑๐ฃณ๐ฃถ๑๐ค๐ฃถ๑๐ค๐ฃต๑๐ฃ๐ฃต๑ก๐ค๐ค this line here
|
37 | ๑ก๐ฃก๐ค this line here
|
38 | ๐ ๑ฃ๑ซ๑๑ก๐ ๐ค๐ค๑ก๐ฃน๐ฃฏ๑ฃ๐ค๐ค๑ซ๐ฃฑ๐ค๑๐ฃฟ๐ฃฟ this line here
|
39 | ๐ ๑ก๑ฉ๑๑๑ฉ๐ ๐ค๐ฅ๑ฉ๐ค๐คต๑ก๐ค๐ค๑๐ค๐คฅ๑๐ฃฐ๐ค๑ฉ๐ฃด๐ฃด this line here
|
40 | ๑ก๐ฃก๐ค this line here
|
41 | ๐ ๐คน๐คฐ๑
ฐ๐ฃ๐ฃฃ๑
๐ฃด๐ฃ๑๐ค๐ฃบ๑๐ฃฅ๐ฃผ๑
ข๐ค ๐ค๑
๐ฃบ๐ค this line here
|
42 | ๐ ๑๑๑ ฉ๑กญ๑ธก๐ ๐คฆ๐คฌ๑๐ค๐ค๑๐ฃฅ๐ค๑กญ๐ฃฏ๐ฃจ๑ ฉ๐ค๐ฃต๑ธก๐ค๐ฃ this line here
|
43 | ๑๐ฃข๐ค this line here
|
44 | ๐ ๐คฆ๐ค๑ตก๐ฃง๐ฃท๑
๐ค๐ค๑ก๐ค๐ฃธ this line here
|
45 | ๐ ๑ง๑ง๑ฟ
๑ฟ๑ธฅ๐ ๐คจ๐ค๑ฟ๐ฃญ๐ค๑ง๐ค๐ฃฑ๑ง๐ฃฅ๐ฃฑ๑ฟ
๐ค๐ค๑ธฅ๐ฃฟ๐ค this line here
|
46 | ๑ก๐ฃก๐ค this line here
|
47 | ๐ ๑๑๑ ฅ๑กฉ๐ ๐ค๐คช๑กฉ๐ฃท๐ค๑๐ค๐ฃก๑ ฅ๐ค๐ค๑๐ฃฏ๐ฃช this line here
|
48 | ๐ ๑
ก๑๑จฌ๐ ๐ค๐คฅ๑๐ฃถ๐ฃฆ๑
ก๐ฃพ๐ฃต๑จฌ๐ฃถ๐ค this line here
|
49 | ๐ ๑
ฑ๑
น๑ฅ๑ต๑ต๐ ๐คข๐ฅ๑
ฑ๐ค๐คค๑
น๐ฃฏ๐คค๑ฅ๐ค๐คน๑ต๐ฃฉ๐คน๑ต๐ฃด๐ฃฏ this line here
|
50 | ๑๐ฃข๐ค this line here`;
|
51 |
|
52 | it('should return matching signs', () => {
|
53 | expect(results('QA๑
กT', signtext)).toEqual(['๐ ๑
ก๑ธ๑จ๑จ๑๑๑ฅ๑ต๐ ๐คค๐คธ๑ธ๐ฃจ๐ฃ๑๐ค๐ค๑๐ฃณ๐ค๑
ก๐ฃผ๐ฃฆ๑ต๐ฃฑ๐ฃบ๑จ๐ค๐ฃ๑ฅ๐ค๐ฃป๑จ๐ค๐ฃ', '๐ ๑
ก๑๑จฌ๐ ๐ค๐คฅ๑๐ฃถ๐ฃฆ๑
ก๐ฃพ๐ฃต๑จฌ๐ฃถ๐ค']);
|
54 | expect(results('QA๑
ฑ๑
นfrT๑ฅ๑ตfr๐ฃฒ๐ฃฒ', signtext)).toEqual(['๐ ๑
ฑ๑
น๑ฅ๑ต๑ต๐ ๐คข๐ฅ๑
ฑ๐ค๐คค๑
น๐ฃฏ๐คค๑ฅ๐ค๐คน๑ต๐ฃฉ๐คน๑ต๐ฃด๐ฃฏ']);
|
55 | })
|
56 |
|
57 | it('should return lines with matching sign at start', () => {
|
58 | expect(lines('QA๑
กT', signlines)).toEqual(['๐ ๑
ก๑ธ๑จ๑จ๑๑๑ฅ๑ต๐ ๐คค๐คธ๑ธ๐ฃจ๐ฃ๑๐ค๐ค๑๐ฃณ๐ค๑
ก๐ฃผ๐ฃฆ๑ต๐ฃฑ๐ฃบ๑จ๐ค๐ฃ๑ฅ๐ค๐ฃป๑จ๐ค๐ฃ this line here', '๐ ๑
ก๑๑จฌ๐ ๐ค๐คฅ๑๐ฃถ๐ฃฆ๑
ก๐ฃพ๐ฃต๑จฌ๐ฃถ๐ค this line here']);
|
59 | expect(lines('QA๑
ฑ๑
นfrT๑ฅ๑ตfr๐ฃฒ๐ฃฒ', signlines)).toEqual(['๐ ๑
ฑ๑
น๑ฅ๑ต๑ต๐ ๐คข๐ฅ๑
ฑ๐ค๐คค๑
น๐ฃฏ๐คค๑ฅ๐ค๐คน๑ต๐ฃฉ๐คน๑ต๐ฃด๐ฃฏ this line here']);
|
60 | })
|