diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2019-03-09 03:23:38 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-09 03:23:38 -0700 |
| commit | bb6b11cafcdf5df6ff4e509d58bc3e5424cc5023 (patch) | |
| tree | d5972104728b55a815649d2c09187149602234f2 /test | |
| parent | 17b1dd090edad3e67e71e8797b9e1d0dda783cdb (diff) | |
resolves #3131 truncate with precision when computing absolute width for columns in DocBook output (PR #3134)
Diffstat (limited to 'test')
| -rw-r--r-- | test/tables_test.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/tables_test.rb b/test/tables_test.rb index 938b7ad2..a60d8d28 100644 --- a/test/tables_test.rb +++ b/test/tables_test.rb @@ -386,6 +386,25 @@ context 'Tables' do assert_css 'tgroup colspec[colwidth="28.3334*"]', output, 1 end + test 'should compute column widths based on pagewidth when width is set on table in DocBook output' do + input = <<~'EOS' + :pagewidth: 500 + + [width=50%] + |======= + |A |B |C |D + + |a |b |c |d + |1 |2 |3 |4 + |======= + EOS + output = convert_string_to_embedded input, backend: 'docbook5' + assert_css 'tgroup[cols="4"]', output, 1 + assert_css 'tgroup colspec', output, 4 + assert_css 'tgroup colspec[colwidth]', output, 4 + assert_css 'tgroup colspec[colwidth="62.5*"]', output, 4 + end + test 'explicit table width is used even when autowidth option is specified' do input = <<~'EOS' [%autowidth,width=75%] |
