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

Function test_read_line_with_prompt

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

Source from the content-addressed store, hash-verified

671
672 #[test]
673 fn test_read_line_with_prompt() {
674 ReadLineInteractiveTest::default()
675 .set_prompt("Ready> ")
676 .add_output(CapturedOut::Write("Ready> ".to_string()))
677 .add_output(CapturedOut::SyncNow)
678 // -
679 .add_key_chars("hello")
680 .add_output_bytes("hello")
681 // -
682 .set_line("hello")
683 .accept();
684
685 ReadLineInteractiveTest::default()
686 .set_prompt("Cannot delete")
687 .add_output(CapturedOut::Write("Cannot delete".to_string()))
688 .add_output(CapturedOut::SyncNow)
689 // -
690 .add_key(Key::Backspace)
691 .accept();
692 }
693
694 #[test]
695 fn test_read_line_with_prompt_larger_than_screen() {

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected