Skip to content

Commit

Permalink
Updated spec.js
Browse files Browse the repository at this point in the history
Updated everything to version 1.2.24
  • Loading branch information
bastianspirek authored Jun 7, 2020
1 parent adbf4f7 commit 00229a7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ describe("Pinyinify", () => {
expect("我现在富得能买我想要的任何东西。").becomes("wǒ xiàn​zài fù de néng mǎi wǒ xiǎng​yào de rèn​hé dōng​xi.");
expect("我们就得这么做。").becomes("wǒ​men jiù děi zhè​me zuò.");
expect("你现在得把门打开。正在动手。").becomes("nǐ xiàn​zài děi bǎ​mén dǎ​kāi. zhèng​zài dòng​shǒu.");
expect("听着,我得先见见这人").becomes("tīng zhe, wǒ děi xiān jiàn jiàn zhè rén");
expect("我得了什么病?").becomes("wǒ dé le shén​me bìng?");
// 还
expect("我有钱了就还你。").becomes("wǒ yǒu​qián le jiù huán nǐ.");
expect("我还给你。").becomes("wǒ huán​gěi nǐ.");
Expand All @@ -54,11 +56,14 @@ describe("Pinyinify", () => {
expect("他还会把钱还律师吗?").becomes("tā hái huì bǎ qián huán lǜ​shī ma?");
expect("好吧,我至少还有些朋友。").becomes("hǎo ba, wǒ zhì​shǎo hái yǒu​xiē péng​you.");
expect("你还爱我吗?").becomes("nǐ hái ài wǒ ma?");
expect("把我小孩还来!").becomes("bǎ wǒ xiǎo​hái huán lái!");
// 只
expect("他是一只鸟。").becomes("tā shì yì zhī niǎo.");
// 长
expect("她长着一张圆脸和一双明亮的眼睛。").becomes("tā zhǎng zhe yì zhāng yuán liǎn hé yì shuāng míng​liàng de yǎn​jing.");
expect("不是他干的,警长。").becomes("bù​shì tā gàn de, jǐng zhǎng.");
expect("你的头发太长了。").becomes("nǐ de tóu​fa tài cháng le.");
expect("我后背上长了个东西。").becomes("wǒ hòu bèi shàng zhǎng le gè dōng​xi.");
// 系
expect("这女孩要我给她把衣服从后面系上。").becomes("zhè nǚ​hái yào wǒ gěi tā bǎ yī​fu cóng hòu​miàn jì shàng.");
expect("一个人的后面有一个系着领带的男人走在道路上").becomes("yí gè rén de hòu​miàn yǒu yí gè jì zhe lǐng​dài de nán​rén zǒu zài dào​lù shàng");
Expand All @@ -73,6 +78,9 @@ describe("Pinyinify", () => {
// 弹
expect("一个双手弹着吉他的男人在舞台上表演").becomes("yí gè shuāng​shǒu tán zhe jí​tā de nán​rén zài wǔ​tái shàng biǎo​yǎn");




expect("行了吗?").becomes("xíng le ma?");
expect("人要是行干一行行一行。").becomes("rén yào​shi xíng gàn yì háng xíng yì háng.");
expect("几行代码?两行代码。行还是不行?行!").becomes("jǐ háng dài​mǎ? liǎng háng dài​mǎ. xíng hái​shi bù​xíng? xíng!");
Expand Down Expand Up @@ -154,5 +162,10 @@ describe("Traditionalize", () => {
});
it("chooses right ambiguous character", () => {
expect(traditionalize(`你对那个女的干了什么?`)).toEqual("你對那個女的幹了什麼?");
// 干
expect(traditionalize("你没把面包包好,它变干了。")).toEqual("你沒把麵包包好,它變乾了。");
// 面
expect(traditionalize("房间里有一个坐着的男人看着一个在吃面的男人")).toEqual("房間裡有一個坐著的男人看著一個在吃麵的男人");
expect(traditionalize("我吃面。")).toEqual("我吃麵。");
});
});

0 comments on commit 00229a7

Please sign in to comment.