[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 10/12] tests/qapi-schema: Add quotes to module name in test ou
From: |
John Snow |
Subject: |
[PATCH v2 10/12] tests/qapi-schema: Add quotes to module name in test output |
Date: |
Wed, 16 Dec 2020 20:59:25 -0500 |
A forthcoming patch is going to allow the empty string as a name for the
builtin module, and quotes will help us see that in test output. Without
this, git will be upset about trailing empty spaces in test output, so
the quotes are necessary.
Signed-off-by: John Snow <jsnow@redhat.com>
---
tests/qapi-schema/comments.out | 4 ++--
tests/qapi-schema/doc-good.out | 4 ++--
tests/qapi-schema/empty.out | 4 ++--
tests/qapi-schema/event-case.out | 4 ++--
tests/qapi-schema/include-repetition.out | 8 ++++----
tests/qapi-schema/include-simple.out | 6 +++---
tests/qapi-schema/indented-expr.out | 4 ++--
tests/qapi-schema/qapi-schema-test.out | 8 ++++----
tests/qapi-schema/test-qapi.py | 2 +-
9 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/tests/qapi-schema/comments.out b/tests/qapi-schema/comments.out
index 273f0f54e16..08aba8354e2 100644
--- a/tests/qapi-schema/comments.out
+++ b/tests/qapi-schema/comments.out
@@ -1,4 +1,4 @@
-module None
+module "None"
object q_empty
enum QType
prefix QTYPE
@@ -9,7 +9,7 @@ enum QType
member qdict
member qlist
member qbool
-module comments.json
+module "comments.json"
enum Status
member good
member bad
diff --git a/tests/qapi-schema/doc-good.out b/tests/qapi-schema/doc-good.out
index 419284dae29..83a3d9bd69b 100644
--- a/tests/qapi-schema/doc-good.out
+++ b/tests/qapi-schema/doc-good.out
@@ -1,4 +1,4 @@
-module None
+module "None"
object q_empty
enum QType
prefix QTYPE
@@ -9,7 +9,7 @@ enum QType
member qdict
member qlist
member qbool
-module doc-good.json
+module "doc-good.json"
enum Enum
member one
if ['defined(IFONE)']
diff --git a/tests/qapi-schema/empty.out b/tests/qapi-schema/empty.out
index 69666c39ad2..0dac23c80c1 100644
--- a/tests/qapi-schema/empty.out
+++ b/tests/qapi-schema/empty.out
@@ -1,4 +1,4 @@
-module None
+module "None"
object q_empty
enum QType
prefix QTYPE
@@ -9,4 +9,4 @@ enum QType
member qdict
member qlist
member qbool
-module empty.json
+module "empty.json"
diff --git a/tests/qapi-schema/event-case.out b/tests/qapi-schema/event-case.out
index 42ae519656d..ace511ba5a9 100644
--- a/tests/qapi-schema/event-case.out
+++ b/tests/qapi-schema/event-case.out
@@ -1,4 +1,4 @@
-module None
+module "None"
object q_empty
enum QType
prefix QTYPE
@@ -9,6 +9,6 @@ enum QType
member qdict
member qlist
member qbool
-module event-case.json
+module "event-case.json"
event oops None
boxed=False
diff --git a/tests/qapi-schema/include-repetition.out
b/tests/qapi-schema/include-repetition.out
index 0b654ddebb6..f7ab4987943 100644
--- a/tests/qapi-schema/include-repetition.out
+++ b/tests/qapi-schema/include-repetition.out
@@ -1,4 +1,4 @@
-module None
+module "None"
object q_empty
enum QType
prefix QTYPE
@@ -9,15 +9,15 @@ enum QType
member qdict
member qlist
member qbool
-module include-repetition.json
+module "include-repetition.json"
include comments.json
include include-repetition-sub.json
include comments.json
-module comments.json
+module "comments.json"
enum Status
member good
member bad
member ugly
-module include-repetition-sub.json
+module "include-repetition-sub.json"
include comments.json
include comments.json
diff --git a/tests/qapi-schema/include-simple.out
b/tests/qapi-schema/include-simple.out
index 061f81e5090..81bdeb887b6 100644
--- a/tests/qapi-schema/include-simple.out
+++ b/tests/qapi-schema/include-simple.out
@@ -1,4 +1,4 @@
-module None
+module "None"
object q_empty
enum QType
prefix QTYPE
@@ -9,9 +9,9 @@ enum QType
member qdict
member qlist
member qbool
-module include-simple.json
+module "include-simple.json"
include include-simple-sub.json
-module include-simple-sub.json
+module "include-simple-sub.json"
enum Status
member good
member bad
diff --git a/tests/qapi-schema/indented-expr.out
b/tests/qapi-schema/indented-expr.out
index 04356775cd1..361a58185e6 100644
--- a/tests/qapi-schema/indented-expr.out
+++ b/tests/qapi-schema/indented-expr.out
@@ -1,4 +1,4 @@
-module None
+module "None"
object q_empty
enum QType
prefix QTYPE
@@ -9,7 +9,7 @@ enum QType
member qdict
member qlist
member qbool
-module indented-expr.json
+module "indented-expr.json"
command eins None -> None
gen=True success_response=True boxed=False oob=False preconfig=False
command zwei None -> None
diff --git a/tests/qapi-schema/qapi-schema-test.out
b/tests/qapi-schema/qapi-schema-test.out
index 8868ca0dca9..4f5ab9fd596 100644
--- a/tests/qapi-schema/qapi-schema-test.out
+++ b/tests/qapi-schema/qapi-schema-test.out
@@ -1,4 +1,4 @@
-module None
+module "None"
object q_empty
enum QType
prefix QTYPE
@@ -9,7 +9,7 @@ enum QType
member qdict
member qlist
member qbool
-module qapi-schema-test.json
+module "qapi-schema-test.json"
object TestStruct
member integer: int optional=False
member boolean: bool optional=False
@@ -443,11 +443,11 @@ command test-command-cond-features3 None -> None
event TEST-EVENT-FEATURES1 None
boxed=False
feature deprecated
-module include/sub-module.json
+module "include/sub-module.json"
include sub-sub-module.json
object SecondArrayRef
member s: StatusList optional=False
-module sub-sub-module.json
+module "sub-sub-module.json"
array StatusList Status
enum Status
member good
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py
index e8db9d09d91..4adf0b3c185 100755
--- a/tests/qapi-schema/test-qapi.py
+++ b/tests/qapi-schema/test-qapi.py
@@ -25,7 +25,7 @@
class QAPISchemaTestVisitor(QAPISchemaVisitor):
def visit_module(self, name):
- print('module %s' % name)
+ print('module "%s"' % name)
def visit_include(self, name, info):
print('include %s' % name)
--
2.26.2
- [PATCH v2 00/12] qapi: static typing conversion, pt1.5, John Snow, 2020/12/16
- [PATCH v2 01/12] qapi/commands: assert arg_type is not None, John Snow, 2020/12/16
- [PATCH v2 02/12] qapi/events: fix visit_event typing, John Snow, 2020/12/16
- [PATCH v2 03/12] qapi/main: handle theoretical None-return from re.match(), John Snow, 2020/12/16
- [PATCH v2 10/12] tests/qapi-schema: Add quotes to module name in test output,
John Snow <=
- [PATCH v2 04/12] qapi/gen: assert that _start_if is not None in _wrap_ifcond, John Snow, 2020/12/16
- [PATCH v2 08/12] qapi/gen: write _genc/_genh access shims, John Snow, 2020/12/16
- [PATCH v2 12/12] qapi: enable strict-optional checks, John Snow, 2020/12/16
- [PATCH v2 07/12] qapi/schema: make QAPISourceInfo mandatory, John Snow, 2020/12/16
- [PATCH v2 05/12] qapi/gen: use './builtin' for the built-in module name, John Snow, 2020/12/16
- [PATCH v2 09/12] qapi/gen: move write method to QAPIGenC, make fname a str, John Snow, 2020/12/16
- [PATCH v2 06/12] qapi/source: Add builtin null-object sentinel, John Snow, 2020/12/16
- [PATCH v2 11/12] qapi/schema: Name the builtin module "" instead of None, John Snow, 2020/12/16