Message ID | 20180808120334.10970-4-armbru@redhat.com |
---|---|
State | New |
Headers | show |
Series | json: Fixes, error reporting improvements, cleanups | expand |
On 08/08/2018 07:02 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster <armbru@redhat.com> > --- > tests/check-qjson.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/check-qjson.c b/tests/check-qjson.c > index 81b92d6b0c..0a9a054c7b 100644 > --- a/tests/check-qjson.c > +++ b/tests/check-qjson.c > @@ -1236,7 +1236,7 @@ static void simple_whitespace(void) > })), > }, > { > - .encoded = " [ 43 , { 'h' : 'b' }, [ ], 42 ]", > + .encoded = "\t[ 43 , { 'h' : 'b' },\n\t[ ], 42 ]\n", I would also test \r, since that is the final whitespace character mentioned in RFC 7159.
Eric Blake <eblake@redhat.com> writes: > On 08/08/2018 07:02 AM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster <armbru@redhat.com> >> --- >> tests/check-qjson.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/tests/check-qjson.c b/tests/check-qjson.c >> index 81b92d6b0c..0a9a054c7b 100644 >> --- a/tests/check-qjson.c >> +++ b/tests/check-qjson.c >> @@ -1236,7 +1236,7 @@ static void simple_whitespace(void) >> })), >> }, >> { >> - .encoded = " [ 43 , { 'h' : 'b' }, [ ], 42 ]", >> + .encoded = "\t[ 43 , { 'h' : 'b' },\n\t[ ], 42 ]\n", > > I would also test \r, since that is the final whitespace character > mentioned in RFC 7159. Easy to do, so why not.
diff --git a/tests/check-qjson.c b/tests/check-qjson.c index 81b92d6b0c..0a9a054c7b 100644 --- a/tests/check-qjson.c +++ b/tests/check-qjson.c @@ -1236,7 +1236,7 @@ static void simple_whitespace(void) })), }, { - .encoded = " [ 43 , { 'h' : 'b' }, [ ], 42 ]", + .encoded = "\t[ 43 , { 'h' : 'b' },\n\t[ ], 42 ]\n", .decoded = QLIT_QLIST(((QLitObject[]){ QLIT_QNUM(43), QLIT_QDICT(((QLitDictEntry[]){
Signed-off-by: Markus Armbruster <armbru@redhat.com> --- tests/check-qjson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)