v.parser: add a test for db46ad5

pull/9359/head
Delyan Angelov 2021-03-18 11:31:17 +02:00
parent db46ad5481
commit f7a8a460f6
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
import json
fn test_calling_functions_with_map_initializations_containing_arrays() {
result := json.encode(map{
// NB: []string{} should NOT be treated as []json.string{}
'users': []string{}
'groups': []string{}
})
assert result == '{"users":[],"groups":[]}'
}