From e07046e63cb7f8763b8a6ef2a240eacf6843e877 Mon Sep 17 00:00:00 2001 From: Jaromir Hradilek Date: Wed, 13 Nov 2024 02:03:41 +0100 Subject: [PATCH] Added more tests for the compose_horizontal_dlist() method. --- test/test_horizontal_dlist.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/test_horizontal_dlist.rb b/test/test_horizontal_dlist.rb index 299aaed..a9941d4 100644 --- a/test/test_horizontal_dlist.rb +++ b/test/test_horizontal_dlist.rb @@ -26,6 +26,17 @@ def test_horizontal_dlist_outputclass assert_xpath_equal xml, 'horizontal-dlist', '//table/@outputclass' end + def test_horizontal_dlist_widths + xml = <<~EOF.chomp.to_dita + [horizontal,labelwidth=30,itemwidth=70] + Term1:: Definition one + Term2:: Definition two + EOF + + assert_xpath_equal xml, '30*', '//table/tgroup/colspec[1]/@colwidth' + assert_xpath_equal xml, '70*', '//table/tgroup/colspec[2]/@colwidth' + end + def test_horizontal_dlist_title xml = <<~EOF.chomp.to_dita .A description list title