test/tables_test.rb in asciidoctor-0.1.0 vs test/tables_test.rb in asciidoctor-0.1.1

- old
+ new

@@ -12,12 +12,12 @@ |======= EOS cells = [%w(A B C), %w(a b c), %w(1 2 3)] output = render_embedded_string input assert_css 'table', output, 1 - assert_css 'table.tableblock.frame-all.grid-all[style~="width: 100%;"]', output, 1 - assert_css 'table > colgroup > col[style~="width: 33%;"]', output, 3 + assert_css 'table.tableblock.frame-all.grid-all[style*="width: 100%"]', output, 1 + assert_css 'table > colgroup > col[style*="width: 33%"]', output, 3 assert_css 'table tr', output, 3 assert_css 'table > tbody > tr', output, 3 assert_css 'table td', output, 9 assert_css 'table > tbody > tr > td.tableblock.halign-left.valign-top > p.tableblock', output, 9 cells.each_with_index {|row, rowi| @@ -231,17 +231,17 @@ |=== EOS output = render_embedded_string input assert_css 'table', output, 1 - assert_css 'table[style~="width: 80%;"]', output, 1 + assert_css 'table[style*="width: 80%"]', output, 1 assert_xpath '/table/caption[@class="title"][text()="Table 1. Horizontal and vertical source data"]', output, 1 assert_css 'table > colgroup > col', output, 4 - assert_css 'table > colgroup > col:nth-child(1)[@style~="width: 17%;"]', output, 1 - assert_css 'table > colgroup > col:nth-child(2)[@style~="width: 11%;"]', output, 1 - assert_css 'table > colgroup > col:nth-child(3)[@style~="width: 11%;"]', output, 1 - assert_css 'table > colgroup > col:nth-child(4)[@style~="width: 58%;"]', output, 1 + assert_css 'table > colgroup > col:nth-child(1)[@style*="width: 17%"]', output, 1 + assert_css 'table > colgroup > col:nth-child(2)[@style*="width: 11%"]', output, 1 + assert_css 'table > colgroup > col:nth-child(3)[@style*="width: 11%"]', output, 1 + assert_css 'table > colgroup > col:nth-child(4)[@style*="width: 58%"]', output, 1 assert_css 'table > thead', output, 1 assert_css 'table > thead > tr', output, 1 assert_css 'table > thead > tr > th', output, 4 assert_css 'table > tbody > tr', output, 3 assert_css 'table > tbody > tr:nth-child(1) > td', output, 4 @@ -262,11 +262,11 @@ d|9 2+>|10 |=== EOS output = render_embedded_string input assert_css 'table', output, 1 - assert_css 'table > colgroup > col[style~="width: 25%;"]', output, 4 + assert_css 'table > colgroup > col[style*="width: 25%"]', output, 4 assert_css 'table > tbody > tr', output, 4 assert_css 'table > tbody > tr > td', output, 10 assert_css 'table > tbody > tr:nth-child(1) > td', output, 4 assert_css 'table > tbody > tr:nth-child(2) > td', output, 3 assert_css 'table > tbody > tr:nth-child(3) > td', output, 1 @@ -450,11 +450,11 @@ nobody:x:99:99:Nobody:/:/sbin/nologin |=== EOS output = render_embedded_string input assert_css 'table', output, 1 - assert_css 'table > colgroup > col[style~="width: 14%;"]', output, 7 + assert_css 'table > colgroup > col[style*="width: 14%"]', output, 7 assert_css 'table > tbody > tr', output, 6 assert_xpath '//tr[4]/td[5]/p/text()', output, 0 assert_xpath '//tr[3]/td[5]/p[text()="MySQL:Server"]', output, 1 end end @@ -473,10 +473,10 @@ air, moon roof, loaded",4799.00 |=== EOS output = render_embedded_string input assert_css 'table', output, 1 - assert_css 'table > colgroup > col[style~="width: 20%;"]', output, 5 + assert_css 'table > colgroup > col[style*="width: 20%"]', output, 5 assert_css 'table > thead > tr', output, 1 assert_css 'table > tbody > tr', output, 4 assert_xpath '((//tbody/tr)[1]/td)[4]/p[text()="ac, abs, moon"]', output, 1 assert_xpath %(((//tbody/tr)[2]/td)[3]/p[text()='Venture "Extended Edition"']), output, 1 assert_xpath '((//tbody/tr)[4]/td)[4]/p[text()="MUST SELL! air, moon roof, loaded"]', output, 1