summaryrefslogtreecommitdiffstats
path: root/tests/xargs_test.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-04 09:08:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-04 09:08:17 +0000
commit3f3add2bc6aafde4b257458dc6e86bc3aaffca0f (patch)
tree8e0dfd4750bb9b10a26b95b4cc2610ca34e6420d /tests/xargs_test.py
parentAdding upstream version 3.3.3. (diff)
downloadpre-commit-3f3add2bc6aafde4b257458dc6e86bc3aaffca0f.tar.xz
pre-commit-3f3add2bc6aafde4b257458dc6e86bc3aaffca0f.zip
Adding upstream version 3.4.0.upstream/3.4.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/xargs_test.py')
-rw-r--r--tests/xargs_test.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/xargs_test.py b/tests/xargs_test.py
index 7c41f98..b0a8e0d 100644
--- a/tests/xargs_test.py
+++ b/tests/xargs_test.py
@@ -147,6 +147,15 @@ def test_xargs_retcode_normal():
assert ret == 5
+@pytest.mark.xfail(sys.platform == 'win32', reason='posix only')
+def test_xargs_retcode_killed_by_signal():
+ ret, _ = xargs.xargs(
+ parse_shebang.normalize_cmd(('bash', '-c', 'kill -9 $$', '--')),
+ ('foo', 'bar'),
+ )
+ assert ret == -9
+
+
def test_xargs_concurrency():
bash_cmd = parse_shebang.normalize_cmd(('bash', '-c'))
print_pid = ('sleep 0.5 && echo $$',)