diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2023-05-06 23:59:23 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-06 23:59:23 -0600 |
| commit | 94c53a11d6ded695dafaef1ce398842a32bbff09 (patch) | |
| tree | 6b0fbb4486ccd9f005d7a79b1a8bd7d2ea37d540 /test/document_test.rb | |
| parent | c9c8373b44e2d268566f988dc7a956cd1943680f (diff) | |
resolves #4448 apply reftext substitutions to value of mantitle attribute in DocBook output (PR #4449)
Diffstat (limited to 'test/document_test.rb')
| -rw-r--r-- | test/document_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/document_test.rb b/test/document_test.rb index 52f3316c..b29408e7 100644 --- a/test/document_test.rb +++ b/test/document_test.rb @@ -1811,6 +1811,26 @@ context 'Document' do assert_xpath %(/xmlns:refentry/xmlns:refmeta/xmlns:refmiscinfo[@class="manual"][text()="#{decode_char 160}"]), result, 1 end + test 'should apply replacements substitution to value of mantitle attribute used in DocBook output' do + input = <<~'EOS' + = foo\--bar(1) + Author Name + :doctype: manpage + :man manual: Foo Bar Manual + :man source: Foo Bar 1.0 + + == NAME + + foo--bar - puts the foo in your bar + EOS + + doc = Asciidoctor.load input, backend: :docbook, standalone: true + assert_equal 'foo\\--bar', (doc.attr 'mantitle') + result = doc.convert + assert_xpath '/xmlns:refentry/xmlns:info/xmlns:title[text()="foo--bar(1)"]', result, 1 + assert_xpath '/xmlns:refentry/xmlns:refmeta/xmlns:refentrytitle[text()="foo--bar"]', result, 1 + end + test 'should be able to set doctype to book when converting to DocBook' do input = <<~'EOS' = Title |
