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

Function test_help_describe_callables_topic

std/src/help.rs:816–844  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

814
815 #[test]
816 fn test_help_describe_callables_topic() {
817 let mut t = tester_with(vec![DoNothingCommand::new(), EmptyFunction::new()]);
818 t.get_console().borrow_mut().set_color(Some(70), Some(50)).unwrap();
819 t.run(r#"help "testing""#)
820 .expect_output([CapturedOut::SetColor(Some(70), Some(50))])
821 .expect_prints([""])
822 .expect_output([
823 CapturedOut::SetColor(Some(TITLE_COLOR), Some(50)),
824 CapturedOut::Print(" Testing".to_owned()),
825 CapturedOut::SetColor(Some(70), Some(50)),
826 ])
827 .expect_prints(["", " This is a sample category for testing.", ""])
828 .expect_output([
829 CapturedOut::Write(" >> ".to_owned()),
830 CapturedOut::SetColor(Some(LINK_COLOR), Some(50)),
831 CapturedOut::Write("DO_NOTHING".to_owned()),
832 CapturedOut::SetColor(Some(70), Some(50)),
833 CapturedOut::Print(" This is the blurb.".to_owned()),
834 ])
835 .expect_output([
836 CapturedOut::Write(" >> ".to_owned()),
837 CapturedOut::SetColor(Some(LINK_COLOR), Some(50)),
838 CapturedOut::Write("EMPTY$ ".to_owned()),
839 CapturedOut::SetColor(Some(70), Some(50)),
840 CapturedOut::Print(" This is the blurb.".to_owned()),
841 ])
842 .expect_prints(["", " Type HELP followed by the name of a topic for details.", ""])
843 .check();
844 }
845
846 #[test]
847 fn test_help_describe_command() {

Callers

nothing calls this directly

Calls 7

tester_withFunction · 0.85
set_colorMethod · 0.45
get_consoleMethod · 0.45
checkMethod · 0.45
expect_printsMethod · 0.45
expect_outputMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected