]> git.feebdaed.xyz Git - 0xmirror/nftables.git/commit
tests: py: Do not rely upon '[end]' marker
authorPhil Sutter <phil@nwl.cc>
Wed, 15 Oct 2025 22:00:05 +0000 (00:00 +0200)
committerPhil Sutter <phil@nwl.cc>
Thu, 23 Oct 2025 20:48:51 +0000 (22:48 +0200)
commitae052a6565f9e9a62ba68d0cbdd1993015310100
treeb731675a20e6454335047e445fac6876ef01f383
parentb84762fd6e248e960e70c26453faf45a5f975e70
tests: py: Do not rely upon '[end]' marker

Set element lines reliably start with whitespace followed by the word "element"
and are separated by the same pattern. Use it instead of '[end]' (or anything
enclosed in brackets).

While at it, recognize payload lines as starting with '  [ ' and avoid
searching for the closing bracket.

Signed-off-by: Phil Sutter <phil@nwl.cc>
tests/py/nft-test.py