Skip to content

Commit

Permalink
new test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptiste Jamin committed Nov 17, 2024
1 parent 5c02387 commit eb3f7f2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/regex.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class RegexList {

// DE
/^Von (?:\s*.+) gesendet$/, // de
/^Gesendet von (?:\s*.+) für (?:\s*.+)$/, // de

// DA
/^Sendt fra (?:\s*.+)$/, // da
Expand Down
9 changes: 9 additions & 0 deletions test/fixtures/email_german_3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Fusce bibendum, quam hendrerit sagittis tempor, dui turpis tempus erat, pharetra sodales ante sem sit amet metus.
Nulla malesuada, orci non vulputate lobortis, massa felis pharetra ex, convallis consectetur ex libero eget ante.
Nam vel turpis posuere, rhoncus ligula in, venenatis orci. Duis interdum venenatis ex a rutrum.
Duis ut libero eu lectus consequat consequat ut vel lorem. Vestibulum convallis lectus urna,
et mollis ligula rutrum quis. Fusce sed odio id arcu varius aliquet nec nec nibh.

Gesendet von Outlook für Android<https://aka.ms/AAb9ysg>

Hi there!
10 changes: 10 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,16 @@ exports.test_email_german_2 = function(test) {
test.done();
};

exports.test_email_german_3 = function(test) {
let email = get_email("email_german_3");

let fragments = email.getFragments();

test.equal(COMMON_FIRST_FRAGMENT, fragments[0].toString().trim());

test.done();
};

exports.test_email_gmail_no = function(test) {
let email = get_email("email_norwegian_gmail");

Expand Down

0 comments on commit eb3f7f2

Please sign in to comment.