From: Phil Sutter Date: Fri, 3 Feb 2023 17:48:33 +0000 (+0100) Subject: tests: xlate: Properly split input in replay mode X-Git-Tag: v1.8.10~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=914350a4586d2817ca7c4919c53142562f27bdaf;p=thirdparty%2Fiptables.git tests: xlate: Properly split input in replay mode Source command may contain quotes, using shlex.split() does the right thing there. Fixes: 7705b2daa3bdc ("tests: xlate: Use --check to verify replay") Signed-off-by: Phil Sutter --- diff --git a/xlate-test.py b/xlate-test.py index 1b544600..09e3b67a 100755 --- a/xlate-test.py +++ b/xlate-test.py @@ -64,7 +64,7 @@ def test_one_replay(name, sourceline, expected, result): if sourceline.find(';') >= 0: sourceline, searchline = sourceline.split(';') - srcwords = sourceline.split() + srcwords = shlex.split(sourceline) srccmd = srcwords[0] ipt = srccmd.split('-')[0]