summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsjamaan <>2011-06-14 19:23:45 +0000
committersjamaan <>2011-06-14 19:23:45 +0000
commite4bf42c38c87f98fe90b013adfb203d659c2a0b9 (patch)
tree4a70acc33f0c3b79f75cea179c0f77a6173eae9f
parentc51071a006d29208c0f0efcb0054ab587659279f (diff)
downloadchicken-xml-rpc-e4bf42c38c87f98fe90b013adfb203d659c2a0b9.tar
chicken-xml-rpc-e4bf42c38c87f98fe90b013adfb203d659c2a0b9.tar.gz
chicken-xml-rpc-e4bf42c38c87f98fe90b013adfb203d659c2a0b9.tar.bz2
chicken-xml-rpc-e4bf42c38c87f98fe90b013adfb203d659c2a0b9.tar.lz
chicken-xml-rpc-e4bf42c38c87f98fe90b013adfb203d659c2a0b9.tar.xz
chicken-xml-rpc-e4bf42c38c87f98fe90b013adfb203d659c2a0b9.tar.zst
chicken-xml-rpc-e4bf42c38c87f98fe90b013adfb203d659c2a0b9.zip
xml-rpc: Add a workaround to the tests so they ignore the day-of-week and day-of-month values when parsing ISO dates since those aren't present. It is undefined what strptime() does to fields that aren't present in the input & format strings.
-rw-r--r--tests/run.scm14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/run.scm b/tests/run.scm
index 5ca0b00..5625fd6 100644
--- a/tests/run.scm
+++ b/tests/run.scm
@@ -263,9 +263,17 @@
(value (string "qux")))))))))
;; Try other different notations (ISO8601 has a variety of notations)
(test "datetime"
- (vector 55 8 14 17 6 98 0 0 #f 0)
- (xml-rpc-fragment->value
- `(dateTime.iso8601 "19980717T14:08:55"))))
+ (vector 55 8 14 17 6 98 'FUBAR 'FUBAR #f 0)
+ (let ((v (xml-rpc-fragment->value
+ `(dateTime.iso8601 "19980717T14:08:55"))))
+ ;; Nasty workaround to account for differences in POSIX
+ ;; strptime() implementations: some fill in missing numbers,
+ ;; others don't. This causes the returned vector to differ
+ ;; on day of week and day of year, because that info is
+ ;; not in the parsed string.
+ (vector-set! v 7 'FUBAR)
+ (vector-set! v 8 'FUBAR)
+ v)))
(test-group "response handling"
(test "simple response"