add a test to test-scan-multibyte
authorc_14 <git@c-14.de>
Mon, 22 May 2017 21:56:12 +0000 (23:56 +0200)
committerPhilipp Takacs <philipp@bureaucracy.de>
Thu, 15 Jun 2017 19:53:57 +0000 (21:53 +0200)
Tests for splitting within a multibyte character.

test/tests/scan/test-scan-multibyte

index 0d843c3..a7a6356 100644 (file)
@@ -10,6 +10,22 @@ export LC_ALL
 
 
 cat >"$MH_TEST_DIR/Mail/inbox/11" <<!
+Mime-Version: 1.0
+From: Bar <bar@example.org>
+To: Baz <baz@example.org>
+Subject: Subject Test Header
+ =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88?=
+ =?UTF-8?q?=E3=83=98=E3=83=BC=E3=83=87=E3=83=BC?=
+Date: Mon, 15 May 2017 15:55:01 +0900
+Content-Transfer-Encoding: quoted-printable
+Content-Type: text/plain; charset=UTF-8
+Message-Id: <20170515065506.03959103B49@example.org>
+
+This is a test email
+
+!
+
+cat >"$MH_TEST_DIR/Mail/inbox/12" <<!
 Subject: =?iso-8859-1?Q?Schl=FCssel?=
 Mime-Version: 1.0
 From: Bob <bob@example.org>
@@ -30,13 +46,22 @@ Bob
 
 !
 
-runandcheck "scan 11 +inbox" <<!
-  11  2014-09-22 01:17  Bob                Schlüssel
+runandcheck "scan 12 +inbox" <<!
+  12  2014-09-22 01:17  Bob                Schlüssel
+!
+
+runandcheck "scan 11-12 +inbox -width 80" <<!
+  11  2017-05-15 15:55  Bar                Subject Test Header テストヘー
+  12  2014-09-22 01:17  Bob                Schlüssel
 !
 
+runandcheck "scan 11-12 +inbox -width 49" <<!
+  11  2017-05-15 15:55  Bar                Subje
+  12  2014-09-22 01:17  Bob                Schlü
+!
 
 LC_ALL=C
 unset MM_CHARSET
-runandcheck "scan 11 +inbox" <<!
-  11  2014-09-22 01:17  Bob                Schl?ssel
+runandcheck "scan 12 +inbox" <<!
+  12  2014-09-22 01:17  Bob                Schl?ssel
 !