diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2013-01-11 14:28:23 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2013-01-13 17:09:24 -0700 |
| commit | 31fa4f68947618e27677a2dd7376a9fc080cd15d (patch) | |
| tree | cadbb84ae2787249ec4b8e757463d8561307e239 /test/document_test.rb | |
| parent | ad0172ae0d0e3cda65c399e90b8f43fed9474ac6 (diff) | |
fully-compliance AsciiDoc table support (psv, dsv, csv)
- classes to manage table content
- parser method for processing table content
- support for nested tables
- support for tables containing a nested AsciiDoc document
- table templates for HTML5 and DocBook45
- constant for default docbook page width
- optimization for matching any block
- rename :title regex to :blk_title
- change option attributes from foo-option to option-foo
- convenience method for checking for block title
- various compliance fixes
- let literal block masquerade as listing block
- require [source] block attribute to treat listing as source code
- don't clobber custom authorinitials
- additional method on test_helper to perform css assertions
- additional method on test_helper to retrieve xml node for xpath or css
Diffstat (limited to 'test/document_test.rb')
| -rw-r--r-- | test/document_test.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/document_test.rb b/test/document_test.rb index 729f905b..6ff731ea 100644 --- a/test/document_test.rb +++ b/test/document_test.rb @@ -24,7 +24,7 @@ context 'Document' do assert !renderer.nil? views = renderer.views assert !views.nil? - assert_equal 25, views.size + assert_equal 26, views.size assert views.has_key? 'document' assert views['document'].is_a?(Asciidoctor::HTML5::DocumentTemplate) end @@ -39,7 +39,7 @@ context 'Document' do assert !renderer.nil? views = renderer.views assert !views.nil? - assert_equal 25, views.size + assert_equal 26, views.size assert views.has_key? 'document' assert views['document'].is_a?(Asciidoctor::DocBook45::DocumentTemplate) end @@ -182,5 +182,17 @@ chapter body assert_xpath '/book/bookinfo/date', result, 1 assert_xpath '/book/simpara[text() = "text"]', result, 1 end + + test 'do not override explicit author initials' do + input = <<-EOS += AsciiDoc +Stuart Rackham <founder@asciidoc.org> +:Author Initials: SJR + +more info... + EOS + output = render_string input, :attributes => {'backend' => 'docbook45'} + assert_xpath '/article/articleinfo/authorinitials[text()="SJR"]', output, 1 + end end end |
