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.4 -r1.5
--- openacs-4/packages/xml-rpc/tcl/test/xml-rpc-test-procs.tcl 17 Sep 2018 13:27:49 -0000 1.4
+++ openacs-4/packages/xml-rpc/tcl/test/xml-rpc-test-procs.tcl 17 Sep 2018 13:28:47 -0000 1.5
@@ -32,7 +32,7 @@
aa_run_with_teardown -rollback -test_code {
set result [xmlrpc::fault $expected_code $expected_string]
-
+
# extract faultCode and faultString
set doc [xml_parse -persist $result]
set value_node [xml_node_get_first_child [xml_node_get_first_child [xml_doc_get_first_node $doc]]]
@@ -44,10 +44,10 @@
}
}
-ad_proc -private xmlrpc_decode_test_prep { value } {
+ad_proc -private xmlrpc_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
+ test, so I broke it out into a separate function for that purpose
} {
set doc [xml_parse -persist "$value"]
set result [xmlrpc::decode_value [xml_doc_get_first_node $doc]]
@@ -71,7 +71,7 @@
set result [xmlrpc_decode_test_prep "- a naked string"]
aa_equals "naked string test" $result "- a naked string"
-
+
set result [xmlrpc_decode_test_prep "22"]
aa_equals "int test" $result 22
@@ -96,7 +96,7 @@
aa_equals "struct test 1" $result(id) 19
aa_equals "struct test 2" $result(content) "My content"
- unset result
+ unset result
set result [xmlrpc_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"
@@ -126,7 +126,7 @@
aa_run_with_teardown -rollback -test_code {
set result [xmlrpc::respond $expected_data]
-
+
# extract data
set doc [xml_parse -persist $result]
set value_node [xml_node_get_first_child [xml_node_get_first_child [xml_node_get_first_child [xml_doc_get_first_node $doc]]]]
@@ -148,29 +148,29 @@
# use testcases from the ad_proc documentation
# int test
- set arglist {-int 33}
+ set arglist {-int 33}
set result [xmlrpc::construct {} $arglist]
aa_equals "int construction" $result "33"
# array test
set arglist {-array {
- {-int 6682}
- {-boolean 0}
- {-text Iowa}
- {-double 8931.33333333}
+ {-int 6682}
+ {-boolean 0}
+ {-text Iowa}
+ {-double 8931.33333333}
{-date {Fri Jan 01 05:41:30 EST 1904}}}}
-
+
set result [xmlrpc::construct {} $arglist]
aa_equals "array construction" $result "66820Iowa8931.3333333319040101T05:41:30"
# struct test
set arglist {-struct {
- ctLeftAngleBrackets {-int 5}
- ctRightAngleBrackets {-int 6}
- ctAmpersands {-int 7}
- ctApostrophes {-int 0}
+ ctLeftAngleBrackets {-int 5}
+ ctRightAngleBrackets {-int 6}
+ ctAmpersands {-int 7}
+ ctApostrophes {-int 0}
ctQuotes {-int 3}}}
-
+
set result [xmlrpc::construct {} $arglist]
aa_equals "struct test" $result "ctLeftAngleBrackets5ctRightAngleBrackets6ctAmpersands7ctApostrophes0ctQuotes3"
}
@@ -208,3 +208,9 @@
}
}
}
+
+# Local variables:
+# mode: tcl
+# tcl-indent-level: 4
+# indent-tabs-mode: nil
+# End: