all repos — min @ 26e9586be408fb3fbb08a7d312d7292c5b008138

A small but practical concatenative programming language.

Fixed net tests.
h3rald h3rald@h3rald.com
Sat, 02 Jun 2018 22:35:05 +0200
commit

26e9586be408fb3fbb08a7d312d7292c5b008138

parent

19ce2215dd6f3183eaaedda5b7151cc5bb6b2dc3

2 files changed, 7 insertions(+), 7 deletions(-)

jump to
M lib/min_net.nimlib/min_net.nim

@@ -51,7 +51,7 @@ protocol = IPPROTO_RAW

elif (sProtocol == "icmp"): protocol = IPPROTO_ICMP var socket = newSocket(domain, sockettype, protocol) - var skt = newSeq[MinValue](0).newVal(i.scope) + var skt = newDict(i.scope) skt = i.dset(skt, "domain", sDomain.newVal) skt = i.dset(skt, "type", sSockType.newVal) skt = i.dset(skt, "protocol", sProtocol.newVal)
M tests/net.mintests/net.min

@@ -3,13 +3,13 @@ 'test import

"net" describe - () socket =srv1 - () socket =srv2 - () socket =cli1 - () socket =cli2 + {} socket :srv1 + {} socket :srv2 + {} socket :cli1 + {} socket :cli2 - () socket "httpbin.org" 80 connect #cli1 + {} socket "httpbin.org" 80 connect @cli1 "min v$1" (version) => % :user-agent "GET /user-agent HTTP/1.1\r\nHost: httpbin.org\r\nUser-Agent: $1\r\n\r\n" (user-agent) => % :req

@@ -19,7 +19,7 @@ cli1 req send

cli1 recv-line :line (response line) => "\n" join @response - (line "}" !=) + (line "\}" match not) ( cli1 recv-line @line (response line) => "\n" join @response