diff options
| author | Peter Hutterer <peter.hutterer@who-t.net> | 2017-01-24 09:56:38 +1000 |
|---|---|---|
| committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2017-01-24 11:59:00 +0200 |
| commit | f8ab47690c03245da4938cbab7a4ba6bcb1bebe0 (patch) | |
| tree | ad9a015b329552129e0965a06678bbced9bb0f8c /tests/data/small.xml | |
| parent | scanner: add helper function to convert "since" to a version (diff) | |
| download | wayland-f8ab47690c03245da4938cbab7a4ba6bcb1bebe0.tar wayland-f8ab47690c03245da4938cbab7a4ba6bcb1bebe0.tar.gz wayland-f8ab47690c03245da4938cbab7a4ba6bcb1bebe0.tar.bz2 wayland-f8ab47690c03245da4938cbab7a4ba6bcb1bebe0.tar.lz wayland-f8ab47690c03245da4938cbab7a4ba6bcb1bebe0.tar.xz wayland-f8ab47690c03245da4938cbab7a4ba6bcb1bebe0.tar.zst wayland-f8ab47690c03245da4938cbab7a4ba6bcb1bebe0.zip | |
scanner: support "since" attribute for enum entries
This was already in the DTD but not supported by the scanner.
The check for ever-increasing "since" tags is not strictly required for enum
entries as we control the binary value. But it keeps the xml file in
good order, preventing things like:
<entry name="first" value="…" />
<entry name="second" value="…" since="3"/>
<entry name="third" value="…" since="2"/>
<entry name="fourth" value="…" since="3"/>
If this is undesirable in the future the check can be removed without
side-effects.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'tests/data/small.xml')
| -rw-r--r-- | tests/data/small.xml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/data/small.xml b/tests/data/small.xml index 571618f..a6e62ad 100644 --- a/tests/data/small.xml +++ b/tests/data/small.xml @@ -26,7 +26,7 @@ SOFTWARE. </copyright> - <interface name="intf_A" version="1"> + <interface name="intf_A" version="3"> <description summary="the thing A"> A useless example trying to tickle the scanner. </description> @@ -48,5 +48,11 @@ <request name="destroy" type="destructor"/> <event name="hey"/> + + <enum name="foo"> + <entry name="first" value="0" summary="this is the first"/> + <entry name="second" value="1" summary="this is the second"/> + <entry name="third" value="2" since="2" summary="this is the third"/> + </enum> </interface> </protocol> |
