From b3a11ac3dba190dce355620935ef45260d6e721e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Wed, 22 Sep 2021 14:57:11 +0200 Subject: Use only POSIX commands and options The hard-coded use of /bin/bash and of long options for nl does only work on Linux based systems with GNU textutils. If POSIX commands and options are used, this test becomes portable to other systems than Linux. --- tests/test_expect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_expect.py b/tests/test_expect.py index c37e159..243bc34 100755 --- a/tests/test_expect.py +++ b/tests/test_expect.py @@ -411,7 +411,7 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase): def test_before_across_chunks(self): # https://github.com/pexpect/pexpect/issues/478 child = pexpect.spawn( - '''/bin/bash -c "openssl rand -base64 {} 2>/dev/null | head -500 | nl --number-format=rz --number-width=5 2>&1 ; echo 'PATTERN!!!'"'''.format(1024 * 1024 * 2), + '''/bin/sh -c "openssl rand -base64 {} 2>/dev/null | head -500 | nl -n rz -w 5 2>&1 ; echo 'PATTERN!!!'"'''.format(1024 * 1024 * 2), searchwindowsize=128 ) child.expect(['PATTERN']) -- cgit v1.2.1