()
| 832 | |
| 833 | #[test] |
| 834 | fn test_read_line_interactive_middle_input() { |
| 835 | ReadLineInteractiveTest::default() |
| 836 | .add_key_chars("some text") |
| 837 | .add_output_bytes("some text") |
| 838 | // - |
| 839 | .add_key(Key::ArrowLeft) |
| 840 | .add_output(CapturedOut::MoveWithinLine(-1)) |
| 841 | // - |
| 842 | .add_key(Key::ArrowLeft) |
| 843 | .add_output(CapturedOut::MoveWithinLine(-1)) |
| 844 | // - |
| 845 | .add_key(Key::ArrowLeft) |
| 846 | .add_output(CapturedOut::MoveWithinLine(-1)) |
| 847 | // - |
| 848 | .add_key(Key::ArrowRight) |
| 849 | .add_output(CapturedOut::MoveWithinLine(1)) |
| 850 | // - |
| 851 | .add_key_chars(" ") |
| 852 | .add_output(CapturedOut::HideCursor) |
| 853 | .add_output_bytes(" ") |
| 854 | .add_output(CapturedOut::Write("xt".to_string())) |
| 855 | .add_output(CapturedOut::MoveWithinLine(-2)) |
| 856 | .add_output(CapturedOut::ShowCursor) |
| 857 | // - |
| 858 | .add_key_chars(".") |
| 859 | .add_output(CapturedOut::HideCursor) |
| 860 | .add_output_bytes(".") |
| 861 | .add_output(CapturedOut::Write("xt".to_string())) |
| 862 | .add_output(CapturedOut::MoveWithinLine(-2)) |
| 863 | .add_output(CapturedOut::ShowCursor) |
| 864 | // - |
| 865 | .set_line("some te .xt") |
| 866 | .accept(); |
| 867 | } |
| 868 | |
| 869 | #[test] |
| 870 | fn test_read_line_interactive_utf8_basic() { |
nothing calls this directly
no test coverage detected