diff --git a/src/command_parser.rs b/src/command_parser.rs index f8bfd72..5eb3589 100644 --- a/src/command_parser.rs +++ b/src/command_parser.rs @@ -694,6 +694,15 @@ mod test { })); } + #[test] + fn parse_pwm_polarity() { + let command = Command::parse(b"pwm 0 polarity reversed"); + assert_eq!(command, Ok(Command::PwmPolarity { + channel: 0, + polarity: Polarity::Reversed, + })); + } + #[test] fn parse_pwm_pid() { let command = Command::parse(b"pwm 0 pid");