Index: openacs-4/packages/xml-rpc/tcl/test/xml-rpc-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xml-rpc/tcl/test/xml-rpc-test-procs.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/xml-rpc/tcl/test/xml-rpc-test-procs.tcl 19 Jul 2019 09:14:31 -0000 1.6 +++ openacs-4/packages/xml-rpc/tcl/test/xml-rpc-test-procs.tcl 11 Dec 2019 14:18:01 -0000 1.7 @@ -44,7 +44,9 @@ } } -ad_proc -private xmlrpc_decode_test_prep { value } { +namespace eval xmlrpc::test {} + +ad_proc -private xmlrpc::test::decode_test_prep { value } { Takes the contents of a <value> node, calls xmlrpc::decode_value and returns the result. This is done repeatedly in the xml_rpc_decode_value test, so I broke it out into a separate function for that purpose @@ -66,44 +68,44 @@ Test xmlrpc::decode_value to be sure it decodes properly } { aa_run_with_teardown -rollback -test_code { - set result [xmlrpc_decode_test_prep "a string"] + set result [xmlrpc::test::decode_test_prep "a string"] aa_equals "string test" $result "a string" - set result [xmlrpc_decode_test_prep "- a naked string"] + set result [xmlrpc::test::decode_test_prep "- a naked string"] aa_equals "naked string test" $result "- a naked string" - set result [xmlrpc_decode_test_prep "22"] + set result [xmlrpc::test::decode_test_prep "22"] aa_equals "int test" $result 22 - set result [xmlrpc_decode_test_prep "33"] + set result [xmlrpc::test::decode_test_prep "33"] aa_equals "i4 test" $result 33 - set result [xmlrpc_decode_test_prep "3.1415"] + set result [xmlrpc::test::decode_test_prep "3.1415"] aa_equals "double test" $result 3.1415 - set result [xmlrpc_decode_test_prep "1"] + set result [xmlrpc::test::decode_test_prep "1"] aa_equals "boolean test 1" $result 1 - set result [xmlrpc_decode_test_prep "f"] + set result [xmlrpc::test::decode_test_prep "f"] aa_equals "boolean test 2" $result 0 - set result [xmlrpc_decode_test_prep "20030821T083122"] + set result [xmlrpc::test::decode_test_prep "20030821T083122"] aa_equals "date test" $result 1061469082 unset result - array set result [xmlrpc_decode_test_prep "id19contentMy content"] + array set result [xmlrpc::test::decode_test_prep "id19contentMy content"] aa_equals "struct test 1" $result(id) 19 aa_equals "struct test 2" $result(content) "My content" unset result - set result [xmlrpc_decode_test_prep "phrase 12nd phrasefinal phrase"] + set result [xmlrpc::test::decode_test_prep "phrase 12nd phrasefinal phrase"] aa_equals "array test 1" [lindex $result 0] "phrase 1" aa_equals "array test 2" [lindex $result 1] "2nd phrase" aa_equals "array test 3" [lindex $result 2] "final phrase" unset result - set result [xmlrpc_decode_test_prep "phrase 1sublistGot it!"] + set result [xmlrpc::test::decode_test_prep "phrase 1sublistGot it!"] array set struct [lindex $result 1] aa_equals "array inside struct inside array" [lindex $struct(sublist) 0] "Got it!" }