diff options
Diffstat (limited to 'stdlib/source/test/lux/world/net/http/client.lux')
-rw-r--r-- | stdlib/source/test/lux/world/net/http/client.lux | 55 |
1 files changed, 33 insertions, 22 deletions
diff --git a/stdlib/source/test/lux/world/net/http/client.lux b/stdlib/source/test/lux/world/net/http/client.lux index 612d599ff..c784d9cbe 100644 --- a/stdlib/source/test/lux/world/net/http/client.lux +++ b/stdlib/source/test/lux/world/net/http/client.lux @@ -1,25 +1,28 @@ (.module: - [lux #* - ["_" test (#+ Test)] - [abstract - [monad (#+ do)]] - [control - [pipe (#+ do>)] - ["." io (#+ IO)] - ["." try] - ["." function]] - [data - ["." binary] - ["." product] - [text - ["%" format (#+ format)] - [encoding - ["." utf8]]]] - [math - ["." random (#+ Random)] - [number - ["." nat]]]] - [\\ + [library + [lux #* + ["_" test (#+ Test)] + [abstract + [monad (#+ do)]] + [control + [pipe (#+ do>)] + ["." io (#+ IO)] + ["." try] + ["." function]] + [data + ["." binary] + ["." product] + ["." text + ["%" format (#+ format)] + [encoding + ["." utf8]]] + [collection + ["." dictionary]]] + [math + ["." random (#+ Random)] + [number + ["." nat]]]]] + [\\library ["." / ["/#" // ["#." status]]]]) @@ -28,7 +31,7 @@ Test (<| (_.covering /._) (_.for [/.Client]) - (do random.monad + (do {! random.monad} [on_post random.nat on_get random.nat on_put random.nat @@ -38,6 +41,8 @@ on_connect random.nat on_options random.nat on_trace random.nat + num_headers (\ ! map (nat.% 10) random.nat) + headers (random.dictionary text.hash num_headers (random.ascii/lower 3) (random.ascii/lower 3)) #let [mock (: (/.Client IO) (implementation (def: (request method url headers data) @@ -81,4 +86,10 @@ [/.options on_options] [/.trace on_trace] )) + (_.cover [/.headers] + (nat.= (dictionary.size headers) + (|> headers + dictionary.entries + /.headers + dictionary.size))) ))))) |