From 5df6c2aefebe3d2abcc939a88e294876d59f03ca Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 17 Jun 2024 13:26:17 +0200 Subject: Adding upstream version 0.72. Signed-off-by: Daniel Baumann --- t/fmt-asciidoc.t | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 t/fmt-asciidoc.t (limited to 't/fmt-asciidoc.t') diff --git a/t/fmt-asciidoc.t b/t/fmt-asciidoc.t new file mode 100644 index 0000000..74aac07 --- /dev/null +++ b/t/fmt-asciidoc.t @@ -0,0 +1,68 @@ +#! /usr/bin/perl +# Text module tester. + +######################### + +use strict; +use warnings; + +use lib q(t); +use Testhelper; + +my @tests; + +foreach my $t ( + qw(Titles BlockTitles BlockId Paragraphs DelimitedBlocks Lists Footnotes Callouts Comments Tables TablesImageText Attributes StyleMacro MacroIncludesHugo IndexEntries) + ) +{ + push @tests, { 'format' => 'asciidoc', 'input' => "fmt/asciidoc/$t.adoc" }; +} + +push @tests, + { + 'format' => 'asciidoc', + 'options' => '-o compat=asciidoctor', + 'input' => 'fmt/asciidoc/StrictDelimitedBlocks.adoc', + 'doc' => 'asciidoctor block fence parsing', + }, + { + 'format' => 'asciidoc', + 'options' => '-o tablecells=1', + 'input' => 'fmt/asciidoc/TablesCells.adoc', + 'doc' => 'test table cells segmentation', + }, + { + 'format' => 'asciidoc', + 'options' => '-o noimagetargets=1', + 'input' => "fmt/asciidoc/NoImageTarget.adoc", + 'doc' => "test ignoring image targets", + }, + { + 'format' => 'asciidoc', + 'options' => '-o nolinting=1', + 'input' => "fmt/asciidoc/LineBreak.adoc", + }, + { + 'format' => 'asciidoc', + 'options' => '-o cleanspaces=1', + 'input' => "fmt/asciidoc/CleanSpaces.adoc", + }, + { + 'format' => 'asciidoc', + 'input' => "fmt/asciidoc/YamlFrontMatter.adoc", + }, + { + 'doc' => "That the yfm_keys and yfm_skip_array options actually work", + 'format' => 'asciidoc', + 'options' => "-o yfm_skip_array -o yfm_keys='title , subtitle,paragraph'", + 'input' => "fmt/asciidoc/YamlFrontMatter_Option.adoc", + }, + { + 'doc' => "That the yfm_keys and yfm_paths options actually work", + 'format' => 'asciidoc', + 'options' => "-o yfm_skip_array -o yfm_keys='subtitle , paragraph' -o yfm_paths='people title'", + 'input' => "fmt/asciidoc/YamlFrontMatter_KeysPaths.adoc", + }; + +run_all_tests(@tests); +0; -- cgit v1.2.3