test: refactor readline interface test
This refactoring is mainly there to improve the readability of the tests and to reduce code lines.
Multiple tests where misplaced and this is now corrected as well. The misplacement makes the diff not that easy to read but functionality wise it's 100% identical as before.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines