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

Function test_color_ok

std/src/console/cmds.rs:717–739  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

715
716 #[test]
717 fn test_color_ok() {
718 fn t() -> Tester {
719 Tester::default()
720 }
721 t().run("COLOR").expect_output([CapturedOut::SetColor(None, None)]).check();
722 t().run("COLOR ,").expect_output([CapturedOut::SetColor(None, None)]).check();
723 t().run("COLOR 1").expect_output([CapturedOut::SetColor(Some(1), None)]).check();
724 t().run("COLOR 1,").expect_output([CapturedOut::SetColor(Some(1), None)]).check();
725 t().run("COLOR , 1").expect_output([CapturedOut::SetColor(None, Some(1))]).check();
726 t().run("COLOR 10, 5").expect_output([CapturedOut::SetColor(Some(10), Some(5))]).check();
727 t().run("COLOR 0, 0").expect_output([CapturedOut::SetColor(Some(0), Some(0))]).check();
728 t().run("COLOR 255, 255")
729 .expect_output([CapturedOut::SetColor(Some(255), Some(255))])
730 .check();
731
732 Tester::default()
733 .run_n(&["COLOR 3, 4", "COLOR"])
734 .expect_output([
735 CapturedOut::SetColor(Some(3), Some(4)),
736 CapturedOut::SetColor(None, None),
737 ])
738 .check();
739 }
740
741 #[test]
742 fn test_color_errors() {

Callers

nothing calls this directly

Calls 5

tFunction · 0.85
run_nMethod · 0.80
checkMethod · 0.45
expect_outputMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected