diff options
author | Florian Westphal <fw@strlen.de> | 2021-03-25 10:34:40 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2021-03-25 12:40:30 +0100 |
commit | ead6345cb4ab23f3277155a611483edace536a46 (patch) | |
tree | 90fa090361abf639b24470253a905725c93c40f3 /tests/py/any/counter.t.json | |
parent | a3e215d7f68f41556912c33b3dcf12781f6b9b59 (diff) |
parser: fix scope closure of COUNTER token
It is closed after allocation, which is too early: this
stopped 'packets' and 'bytes' from getting parsed correctly.
Also add a test case for this.
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/py/any/counter.t.json')
-rw-r--r-- | tests/py/any/counter.t.json | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/py/any/counter.t.json b/tests/py/any/counter.t.json new file mode 100644 index 00000000..2d1eaa99 --- /dev/null +++ b/tests/py/any/counter.t.json @@ -0,0 +1,39 @@ +# counter +[ + { + "counter": { + "bytes": 0, + "packets": 0 + } + } +] + +# counter packets 0 bytes 0 +[ + { + "counter": { + "bytes": 0, + "packets": 0 + } + } +] + +# counter packets 2 bytes 1 +[ + { + "counter": { + "bytes": 1, + "packets": 2 + } + } +] + +# counter bytes 1024 packets 1 +[ + { + "counter": { + "bytes": 1024, + "packets": 1 + } + } +] |