MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_read_line_interactive_middle_input

Function test_read_line_interactive_middle_input

std/src/console/readline.rs:834–867  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 6

acceptMethod · 0.80
set_lineMethod · 0.80
add_outputMethod · 0.80
add_output_bytesMethod · 0.80
add_key_charsMethod · 0.80
add_keyMethod · 0.80

Tested by

no test coverage detected