Index: openacs-4/packages/xowiki/www/admin/test.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/Attic/test.tcl,v diff -u -r1.31 -r1.32 --- openacs-4/packages/xowiki/www/admin/test.tcl 20 May 2011 17:10:52 -0000 1.31 +++ openacs-4/packages/xowiki/www/admin/test.tcl 25 Nov 2011 09:59:58 -0000 1.32 @@ -831,6 +831,28 @@ && $(parent_id) eq $folder_id && $(item_id) == 0}} 1 "\n$test:\n [array get {}]\n " ################################ + test subsection "Absolute to toplevel:" + + set l "/f1" + set test [label "item_ref" "absolute existing topfolder short" $l] + array set "" [p item_ref -default_lang en -parent_id $folder_id $l] + ? {expr {$(link_type) eq "link" && $(prefix) eq "" && $(stripped_name) eq "f1" + && $(parent_id) eq $folder_id && $(item_id) == $f1_id}} 1 "\n$test:\n [array get {}]\n " + + set l "/f1/" + set test [label "item_ref" "absolute existing topfolder short slash" $l] + array set "" [p item_ref -default_lang en -parent_id $folder_id $l] + ? {expr {$(link_type) eq "link" && $(prefix) eq "" && $(stripped_name) eq "f1" + && $(parent_id) eq $folder_id && $(item_id) == $f1_id}} 1 "\n$test:\n [array get {}]\n " + + set l "/" ;# stripped name will be the name of the root folder + set test [label "item_ref" "just slash" $l] + array set "" [p item_ref -default_lang de -parent_id $folder_id $l] + ? {expr {$(link_type) eq "folder" && $(prefix) eq "" + && $(parent_id) == -100 && $(item_id) == $folder_id}} 1 "\n$test:\n [array get {}]\n " + + + ################################ test subsection "Relative to current folder:" set l "./parentpage"