improve xargs when running windows batch files

This commit is contained in:
Anthony Sottile
2020-11-06 13:09:01 -08:00
parent c972205214
commit 14f984fbcf
2 changed files with 19 additions and 0 deletions

View File

@@ -195,3 +195,12 @@ def test_xargs_color_true_makes_tty():
)
assert retcode == 0
assert out == b'True\n'
@pytest.mark.xfail(os.name == 'posix', reason='nt only')
@pytest.mark.parametrize('filename', ('t.bat', 't.cmd', 'T.CMD'))
def test_xargs_with_batch_files(tmpdir, filename):
f = tmpdir.join(filename)
f.write('echo it works\n')
retcode, out = xargs.xargs((str(f),), ('x',) * 8192)
assert retcode == 0, (retcode, out)