2021-03-16 13:35:41 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2021 lingdocs.com
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
import { simplifyPhonetics } from "./simplify-phonetics";
|
|
|
|
|
|
|
|
const toTest: [string, string][] = [
|
|
|
|
["saRéy", "saRey"],
|
|
|
|
["Utráa`ee", "Utraaee"],
|
|
|
|
["be kaar", "bekaar"],
|
|
|
|
["ma'alóom", "maaloom"],
|
|
|
|
["lÚtfan", "lUtfan"],
|
|
|
|
["písta", "pista"],
|
|
|
|
["săr", "sar"],
|
|
|
|
["kawúl", "kawul"],
|
|
|
|
["sắr", "sar"],
|
2021-03-16 14:17:55 +00:00
|
|
|
["kaar-U-baar", "kaarUbaar"],
|
2021-03-16 13:35:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
test("simplifyPhonetics should work", () => {
|
|
|
|
toTest.forEach((pair) => {
|
|
|
|
expect(simplifyPhonetics(pair[0])).toEqual(pair[1]);
|
|
|
|
});
|
|
|
|
});
|