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

--HG--
branch : 2.7
extra : source : c4b5a5d44254f619e469e6e873d74554ba77e703