--- loncom/xml/lontable.test 2008/12/23 11:49:32 1.3 +++ loncom/xml/lontable.test 2008/12/29 11:57:37 1.4 @@ -3,7 +3,7 @@ # The LearningOnline Network with CAPA # Generating TeX tables. # -# $Id: lontable.test,v 1.3 2008/12/23 11:49:32 foxr Exp $ +# $Id: lontable.test,v 1.4 2008/12/29 11:57:37 foxr Exp $ # # # Copyright Michigan State University Board of Trustees @@ -219,30 +219,35 @@ ok($cell->{'colspan'} == 1, 'Colspan 2,2 # +----------+---------+----+-----------+---------+ -$testobject = new Apache::lontable({theme => "Dresden"}); +$testobject = new Apache::lontable({theme => "Dresden", + caption => "This is the table caption", + outer_border => 1, + inner_border => 1, + width => '1.0\textwidth', + alignment => 'left'}); $testobject->start_row(); $testobject->add_cell('2 cols 3 rows', {rowspan => 3, colspan => 2}); $testobject->add_cell('2 cols 1 row', {colspan => 2}); $testobject->end_row(); -$testobject->start_row(); -$testobject->add_cell('ordinary cell'); +$testobject->start_row({default_halign => 'left'}); $testobject->add_cell('ordinary cell'); +$testobject->add_cell('ordinary cell', {halign => 'center'}); $testobject->end_row(); -$testobject->start_row(); -$testobject->add_cell('2 rows 1 col', {rowspan => 2}); +$testobject->start_row({default_halign => 'right'}); +$testobject->add_cell('2 rows 1 col', {rowspan => 2, halign => 'right'}); $testobject->add_cell('ordinary cell'); $testobject->end_row(); -$testobject->start_row(); -$testobject->add_cell('ordinary cell'); +$testobject->start_row({default_halign => 'center'}); $testobject->add_cell('ordinary cell'); $testobject->add_cell('ordinary cell'); +$testobject->add_cell('ordinary cell', {halign => 'left'}); $testobject->end_row(); -# First of all the table should have figured out tere are 4 cols and 4 rows: +# First of all the table should have figured out there are 4 cols and 4 rows: ok($testobject->get_object_attribute('column_count') == 4, 'col count with spans');