1
1
mirror of https://github.com/kanaka/mal.git synced 2024-08-16 17:20:23 +03:00

step 1: Test a hash-map with more than one entry.

All the existing tests in step 1 use empty or single-element hash-maps.
That avoids any dependency on the ordering of printed hash-maps, but it
does mean that some code paths (e.g. printing the space between hash-map
elements) aren't tested.  Add a test that creates a three-element
hash-map and uses some regexp trickery to check that all the right keys
and values come out.
This commit is contained in:
Ben Harris 2019-07-07 11:12:22 +01:00
parent eacb46df65
commit 876e6545c2

View File

@ -153,6 +153,8 @@ false
;=>{"a" {"b" {"c" 3}}}
{ "a" {"b" { "cde" 3 } }}
;=>{"a" {"b" {"cde" 3}}}
{"1" 1 "2" 2 "3" 3}
;/{"([1-3])" \1 "(?!\1)([1-3])" \2 "(?!\1)(?!\2)([1-3])" \3}
{ :a {:b { :cde 3 } }}
;=>{:a {:b {:cde 3}}}