summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsjamaan <>2012-03-01 18:36:34 +0000
committersjamaan <>2012-03-01 18:36:34 +0000
commit83f1a37dea0044ca616d1f9e19e7b1db2053fd0a (patch)
treef620ef463b64d75f3edb598c72429890b13ea26b
parentd6dc9a7425c3f86fd745ba8d2361fa32e4aaa6b4 (diff)
downloadchicken-xml-rpc-83f1a37dea0044ca616d1f9e19e7b1db2053fd0a.tar
chicken-xml-rpc-83f1a37dea0044ca616d1f9e19e7b1db2053fd0a.tar.gz
chicken-xml-rpc-83f1a37dea0044ca616d1f9e19e7b1db2053fd0a.tar.bz2
chicken-xml-rpc-83f1a37dea0044ca616d1f9e19e7b1db2053fd0a.tar.lz
chicken-xml-rpc-83f1a37dea0044ca616d1f9e19e7b1db2053fd0a.tar.xz
chicken-xml-rpc-83f1a37dea0044ca616d1f9e19e7b1db2053fd0a.tar.zst
chicken-xml-rpc-83f1a37dea0044ca616d1f9e19e7b1db2053fd0a.zip
xml-rpc: Fix tests so they don't try to compare hash-tables immediately and update copyright notice
-rw-r--r--tests/run.scm57
-rw-r--r--xml-rpc-client.scm2
-rw-r--r--xml-rpc-lolevel.scm4
-rw-r--r--xml-rpc-server.scm2
-rw-r--r--xml-rpc.meta5
5 files changed, 37 insertions, 33 deletions
diff --git a/tests/run.scm b/tests/run.scm
index 5fe04d4..3c2a8af 100644
--- a/tests/run.scm
+++ b/tests/run.scm
@@ -239,35 +239,42 @@
(value (string "def")))))
(value (string "ghi"))))))
(test "empty struct"
- (alist->hash-table '())
- (xml-rpc-fragment->value `(struct)))
+ '()
+ (hash-table->alist (xml-rpc-fragment->value `(struct))))
(test "simple struct"
- (alist->hash-table '((foo . "bar")))
- (xml-rpc-fragment->value `(struct (member (name "foo")
- (value (string "bar"))))))
+ '((foo . "bar"))
+ (hash-table->alist
+ (xml-rpc-fragment->value `(struct (member (name "foo")
+ (value (string "bar")))))))
(test "simple struct - rearranged name/value"
- (alist->hash-table '((foo . "bar")))
- (xml-rpc-fragment->value `(struct (member (value (string "bar"))
- (name "foo")))))
+ '((foo . "bar"))
+ (hash-table->alist
+ (xml-rpc-fragment->value `(struct (member (value (string "bar"))
+ (name "foo"))))))
(test "nested struct"
- (alist->hash-table `((foo . ,(alist->hash-table '((bar . "qux"))))))
- (xml-rpc-fragment->value `(struct
- (member
- (name "foo")
- (value (struct
- (member
- (name "bar")
- (value (string "qux")))))))))
+ `((foo . ((bar . "qux"))))
+ (map (lambda (x) (cons (car x) (hash-table->alist (cdr x))))
+ (hash-table->alist
+ (xml-rpc-fragment->value
+ `(struct (member
+ (name "foo")
+ (value (struct
+ (member
+ (name "bar")
+ (value (string "qux")))))))))))
(test "nasty nested struct with attrs"
- (alist->hash-table `((foo . ,(alist->hash-table '((bar . "qux"))))))
- (xml-rpc-fragment->value `(struct (@ (lang "en"))
- (member
- (name (@ (dir "rtl")) "foo")
- (value (@ (type "dictionary"))
- (struct
- (member
- (name "bar")
- (value (string "qux")))))))))
+ `((foo . ((bar . "qux"))))
+ (map (lambda (x) (cons (car x) (hash-table->alist (cdr x))))
+ (hash-table->alist
+ (xml-rpc-fragment->value
+ `(struct (@ (lang "en"))
+ (member
+ (name (@ (dir "rtl")) "foo")
+ (value (@ (type "dictionary"))
+ (struct
+ (member
+ (name "bar")
+ (value (string "qux")))))))))))
;; Try other different notations (ISO8601 has a variety of notations)
(test "datetime"
(vector 55 8 14 17 6 98 'FUBAR 'FUBAR #f 0)
diff --git a/xml-rpc-client.scm b/xml-rpc-client.scm
index aa2415c..6f60ae5 100644
--- a/xml-rpc-client.scm
+++ b/xml-rpc-client.scm
@@ -4,7 +4,7 @@
;;
;; This file contains a client implementation.
;
-; Copyright (c) 2009, Peter Bex
+; Copyright (c) 2009-2012, Peter Bex
; Parts Copyright (c) Felix Winkelmann
; All rights reserved.
;
diff --git a/xml-rpc-lolevel.scm b/xml-rpc-lolevel.scm
index e5565b5..d33b0c8 100644
--- a/xml-rpc-lolevel.scm
+++ b/xml-rpc-lolevel.scm
@@ -4,7 +4,7 @@
;;
;; This file contains the plumbing for XML RPC value marshaling/unmarshaling.
;
-; Copyright (c) 2009, Peter Bex
+; Copyright (c) 2009-2012, Peter Bex
; Parts Copyright (c) Felix Winkelmann
; All rights reserved.
;
@@ -38,8 +38,6 @@
; ticket tracking system (assign tickets to user 'sjamaan'):
; http://trac.callcc.org
-(provide 'xml-rpc-lolevel)
-
(module xml-rpc-lolevel
(signal-xml-rpc-error
xml-rpc-unparsers value->xml-rpc-fragment
diff --git a/xml-rpc-server.scm b/xml-rpc-server.scm
index 7f30b62..d14ea58 100644
--- a/xml-rpc-server.scm
+++ b/xml-rpc-server.scm
@@ -4,7 +4,7 @@
;;
;; This file contains a server implementation.
;
-; Copyright (c) 2009, Peter Bex
+; Copyright (c) 2009-2012, Peter Bex
; Parts Copyright (c) Felix Winkelmann
; All rights reserved.
;
diff --git a/xml-rpc.meta b/xml-rpc.meta
index 7f53cc8..ebcdafb 100644
--- a/xml-rpc.meta
+++ b/xml-rpc.meta
@@ -1,4 +1,4 @@
-;;; xml-rpc.meta -*- Hen -*-
+;;; xml-rpc.meta -*- Scheme -*-
((egg "xml-rpc.egg")
(synopsis "XML-RPC client/server")
@@ -7,5 +7,4 @@
(test-depends test) ; numbers
(doc-from-wiki)
(license "BSD")
- (author "Peter Bex")
- (files "xml-rpc.meta" "xml-rpc.release-info" "xml-rpc-lolevel.scm" "xml-rpc-client.scm" "tests/run.scm" "xml-rpc.setup" "xml-rpc-server.scm"))
+ (author "Peter Bex"))