()
| 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() { |
nothing calls this directly
no test coverage detected