Skip to content

Commit

Permalink
A whopping amount of hebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
ronshapiro committed Jan 20, 2025
1 parent a93567d commit c9e1ee8
Show file tree
Hide file tree
Showing 21 changed files with 475 additions and 156 deletions.
15 changes: 13 additions & 2 deletions __tests__/books.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class Subject {
errors.push(`expected title to be ${title}, but was ${queryResult.bookName}`);
}
if (queryResult.start !== start) {
errors.push(`expected start to be ${start}, but was {queryResult.start}`);
errors.push(`expected start to be ${start}, but was ${queryResult.start}`);
}
if (queryResult.end !== end) {
errors.push(`expected end to be ${end}, but was {queryResult.end}`);
errors.push(`expected end to be ${end}, but was ${queryResult.end}`);
}

expect(errors).toEqual([]);
Expand Down Expand Up @@ -105,3 +105,14 @@ test("Invalid chapters", () => {
assertThat("Shabbat A-2").doesntParse();
assertThat("Shabbat 2-4suffix").doesntParse();
});

test("Hebrew", () => {
assertThat('שבת ע"ג,א-ע״ד').isExtractedTo("Shabbat", "73a", "74b");
assertThat('שבת ט״ו,ב').isExtractedTo("Shabbat", "15b");
assertThat('שבת ט"ו,ב').isExtractedTo("Shabbat", "15b");
assertThat('שבת טו,ב').isExtractedTo("Shabbat", "15b");
assertThat('שבת טט').doesntParse();

assertThat('אסתר א').isExtractedTo("Esther", "1");
assertThat('שולחן ערוך אורח חיים ג-ז').isExtractedTo("Shulchan Arukh, Orach Chayim", "3", "7");
});
Loading

0 comments on commit c9e1ee8

Please sign in to comment.