aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/bugs/table_can_not_deal_with_Chinese_.mdwn14
-rwxr-xr-xt/table.t10
2 files changed, 24 insertions, 0 deletions
diff --git a/doc/bugs/table_can_not_deal_with_Chinese_.mdwn b/doc/bugs/table_can_not_deal_with_Chinese_.mdwn
index 5c2b0b2ae..92be2b636 100644
--- a/doc/bugs/table_can_not_deal_with_Chinese_.mdwn
+++ b/doc/bugs/table_can_not_deal_with_Chinese_.mdwn
@@ -97,3 +97,17 @@ I've hit this bug with an inline-table and 3.20190228-1 (so: patch applied), wit
I (HB1), 70 (PB1), 5 (PB50) Dune O ✓"""]]
I'm going to attempt to work around it by moving to an external CSV. ­— [[Jon]]
+
+> What version of Text::CSV (Debian: `libtext-csv-perl`) are you using?
+> What version of Text::CSV::XS (Debian: `libtext-csv-xs-perl`) are you
+> using, if any?
+>
+> I could't reproduce this with `libtext-csv-perl_2.00-1` and
+> `libtext-csv-xs-perl_1.39-1`, assuming that the whitespace in
+> `delimiter="..."` was meant to be a literal tab character, and that
+> the data row has literal tabs before Dune, before O and before ✓.
+>
+> It would be great if you could modify `t/table.t` to include a failing
+> test-case, and push it to your github fork or something, so I can apply
+> it without having to guess precisely what the whitespace should be.
+> --[[smcv]]
diff --git a/t/table.t b/t/table.t
index d7e9e6ff0..a7bbc06bf 100755
--- a/t/table.t
+++ b/t/table.t
@@ -48,6 +48,12 @@ Key | Value
ASCII | hello
Not ASCII | ¬
"""]]');
+write_old_file("jon.mdwn",
+'(See doc/bugs/table_can_not_deal_with_Chinese.mdwn)
+
+[[!table class=fullwidth_table delimiter=" " data="""
+Number Title Own? Read?
+I (HB1), 70 (PB1), 5 (PB50) Dune O ✓"""]]');
ok(! system(@command));
ok(! system(@command, "--refresh"));
@@ -60,6 +66,10 @@ like($blob, qr{<td>\s*Not ASCII\s*</td>.*<td>\s*¬\s*</td>}s);
SKIP: {
skip "Text::CSV unavailable", 0 unless eval q{use Text::CSV; 1};
+ $blob = readfile("t/tmp/out/jon.html");
+ like($blob, qr{<th>\s*Number\s*</th>\s*<th>\s*Title\s*</th>\s*<th>\s*Own\?\s*</th>\s*<th>\s*Read\?\s*</th>}s);
+ like($blob, qr{<td>\s*I \(HB1\), 70 \(PB1\), 5 \(PB50\)\s*</td>\s*<td>\s*Dune\s*</td>\s*<td>\s*O\s*</td>\s*<td>\s*✓\s*</td>}s);
+
$blob = readfile("t/tmp/out/csv.html");
like($blob, qr{<th>\s*Key\s*</th>.*<th>\s*Value\s*</th>}s);
like($blob, qr{<td>\s*ASCII\s*</td>.*<td>\s*hello\s*</td>}s);