Phil Sutter <phil@xxxxxx> wrote: > On Tue, Nov 29, 2022 at 03:05:41PM +0100, Florian Westphal wrote: > > Now that xtables-translate encloses the entire command line in ', update > > the test cases accordingly. > > We could also do something like this (untested) and leave the test cases > as-is: > > diff --git a/xlate-test.py b/xlate-test.py > index f3fcd797af908..82999beadb2d6 100755 > --- a/xlate-test.py > +++ b/xlate-test.py > @@ -158,9 +158,14 @@ xtables_nft_multi = 'xtables-nft-multi' > sourceline = line.split(';')[0] > > expected = payload.readline().rstrip(" \n") > - next_expected = payload.readline() > + if expected.startswith("nft ") and expected[5] != "'": > + expected = "nft '" + expected.removeprefix("nft ") + "'" > + next_expected = payload.readline().rstrip(" \n") > if next_expected.startswith("nft"): > - expected += "\n" + next_expected.rstrip(" \n") > + if next_expected[5] != "'": > + expected += "\nnft '" + next_expected.removeprefix("nft ") + "'" > + else: > + expected += "\n" + next_expected Thats not enough, because the test cases escape ", but the new output doesn't do this anymore.