Index: openacs-4/packages/xowiki/tcl/test/includelet-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/test/Attic/includelet-test-procs.tcl,v diff -u -N -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/xowiki/tcl/test/includelet-test-procs.tcl 7 Mar 2022 15:02:24 -0000 1.1.2.1 +++ openacs-4/packages/xowiki/tcl/test/includelet-test-procs.tcl 7 Mar 2022 16:00:36 -0000 1.1.2.2 @@ -42,21 +42,36 @@ # Create a trivial ToC page with "list" style and # check that this won't return an error # - foreach {name po} { - p1 1 - p1_1 1.1 - p1_2 1.2 - p1_10 1.10 - p1_2 2 + foreach {po} { + 1 + 1.1 + 1.2 + 1.10 + 1.1.1 + 2 + 2.1 + 3 + 3.1 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 10.1 + 100 } { - set id($name) [xowiki::test::require_page \ + set id($po) [xowiki::test::require_page \ -page_order $po \ - en:$name \ + en:p$po \ $f_id $package_id] - } - ::xo::db::CrClass get_instance_from_db -item_id $id(p1) - set HTML [$id(p1) include {toc -full 1 -decoration plain}] + } + ::xo::db::CrClass get_instance_from_db -item_id $id(1) + set HTML [$id(1) include {toc -full 1 -decoration plain}] + ns_log notice R0=$HTML + acs::test::dom_html root $HTML { set elements [lmap node [$root selectNodes //li] {lindex [$node asText] 0}] } @@ -65,9 +80,16 @@ aa_true "find 1.2" {[lsearch $elements 1.2] > -1} aa_true "find 1.10" {[lsearch $elements 1.10] > -1} aa_true "1.1 before 1.2" {[lsearch $elements 1.1] < [lsearch $elements 1.2]} - aa_true "1.2 before 1.10" {[lsearch $elements 1.2] < [lsearch $elements 1.10]} - ns_log notice R=$HTML + aa_true "1.2 before 1.10" {[lsearch $elements 1.2] < [lsearch $elements 1.10]} + aa_true "3.1 before 9" {[lsearch $elements 3.1] < [lsearch $elements 9]} + aa_true "2 before 100" {[lsearch $elements 2] < [lsearch $elements 100]} + #set HTML [$id(1) include {toc -style list -full 1 -decoration plain}] + #ns_log notice R1=$HTML + + #set HTML [$id(1) include {toc -style list -expand_all true -decoration plain}] + #ns_log notice R2=$HTML + } finally { # set node_id [site_node::get_node_id -url /$instance] # site_node::unmount -node_id $node_id