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