diff options
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.scm | 14 |
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" |