aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2015-05-04 09:05:36 -0600
committerMarkus Armbruster <armbru@redhat.com>2015-05-05 18:39:02 +0200
commita7f5966b297330f6492020019544ae87c45d699b (patch)
tree45224ce83f62a85570c12dfcd09ae22293b06123 /tests/Makefile
parent363b4262a10a52f6d7ac1073bab5e6648da4051b (diff)
qapi: Support (subset of) \u escapes in strings
The handling of \ inside QAPI strings was less than ideal, and really only worked JSON's \/, \\, \", and our extension of \' (an obvious extension, when you realize we use '' instead of "" for strings). For other things, like '\n', it resulted in a literal 'n' instead of a newline. Of course, at the moment, we really have no use for escaped characters, as QAPI has to map to C identifiers, and we currently support ASCII only for that. But down the road, we may add support for default values for string parameters to a command or struct; if that happens, it would be nice to correctly support all JSON escape sequences, such as \n or \uXXXX. This gets us closer, by supporting Unicode escapes in the ASCII range. Since JSON does not require \OCTAL or \xXX escapes, and our QMP implementation does not understand them either, I intentionally reject it here, but it would be an easy addition if we desired it. Likewise, intentionally refusing the NUL byte means we don't have to worry about C strings being shorter than the qapi input. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/Makefile')
-rw-r--r--tests/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile
index e2a3bd349e..547a2499be 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -212,6 +212,8 @@ check-qapi-schema-y := $(addprefix tests/qapi-schema/, \
enum-clash-member.json enum-max-member.json enum-union-clash.json \
enum-bad-name.json funny-char.json indented-expr.json \
missing-type.json bad-ident.json ident-with-escape.json \
+ escape-outside-string.json unknown-escape.json \
+ escape-too-short.json escape-too-big.json unicode-str.json \
double-type.json bad-base.json bad-type-bool.json bad-type-int.json \
bad-type-dict.json double-data.json unknown-expr-key.json \
redefined-type.json redefined-command.json redefined-builtin.json \