diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2019-03-01 17:46:00 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-01 17:46:00 -0700 |
| commit | 4e64a87a12e074d12ceafd5c3a2164a4a6aac7b4 (patch) | |
| tree | 4118ee332e780299a00e67608186dc4cc8526aa2 /test/converter_test.rb | |
| parent | 719077330a51b023d41237bfc9b058d0486ae613 (diff) | |
resolves #891 allow backend to delegate to a registered backend using the syntax synthetic:delegate (PR #3100)
Diffstat (limited to 'test/converter_test.rb')
| -rw-r--r-- | test/converter_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/converter_test.rb b/test/converter_test.rb index 93db687d..57a7ddc7 100644 --- a/test/converter_test.rb +++ b/test/converter_test.rb @@ -154,6 +154,16 @@ context 'Converter' do assert_xpath '//aside/header/following-sibling::p[text()="Sidebar content"]', output, 1 end + test 'should allow custom backend to emulate a known backend' do + doc = Asciidoctor.load 'content', backend: 'html5-tweaks:html', template_dir: (fixture_path 'custom-backends/haml'), template_cache: false + assert doc.basebackend? 'html' + assert_equal 'html5-tweaks', doc.backend + converter = doc.converter + assert_kind_of Asciidoctor::Converter::TemplateConverter, (converter.find_converter 'embedded') + refute_kind_of Asciidoctor::Converter::TemplateConverter, (converter.find_converter 'admonition') + assert_equal '<p>content</p>', doc.convert + end + test 'should create template converter even when a converter is not registered for the specified backend' do input = 'paragraph content' output = convert_string_to_embedded input, backend: :unknown, template_dir: (fixture_path 'custom-backends/haml/html5-tweaks'), template_cache: false |
