Issue #22773: fix failing test with old readline versions due to issue #19884.

--HG--
branch : 3.4