mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-28 18:32:41 +00:00
test/hfp: test invalid commands
This commit is contained in:
parent
36916f811e
commit
d4c70691b6
@ -652,12 +652,18 @@ TEST(HFPParser, custom_command_hf_with_assignment){
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST(HFPParser, HFP_GABRBAGE_AND_ANSWER_CALL){
|
TEST(HFPParser, HFP_GABRBAGE_AND_ANSWER_CALL){
|
||||||
parse_ag("\r\nABCDEF\r\n");
|
parse_ag("\r\nAT+ABCDEF\r\n");
|
||||||
|
CHECK_EQUAL(HFP_CMD_UNKNOWN, context.command);
|
||||||
snprintf(packet, sizeof(packet), "\r\n%s\r\n", HFP_ANSWER_CALL);
|
snprintf(packet, sizeof(packet), "\r\n%s\r\n", HFP_ANSWER_CALL);
|
||||||
parse_ag(packet);
|
parse_ag(packet);
|
||||||
CHECK_EQUAL(HFP_CMD_CALL_ANSWERED, context.command);
|
CHECK_EQUAL(HFP_CMD_CALL_ANSWERED, context.command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(HFPParser, AG_SENDS_RANDOM){
|
||||||
|
parse_hf("\r\n+$PATH:511\r\n");
|
||||||
|
CHECK_EQUAL(HFP_CMD_UNKNOWN, context.command);
|
||||||
|
}
|
||||||
|
|
||||||
TEST(HFPParser, long_command){
|
TEST(HFPParser, long_command){
|
||||||
char command[300];
|
char command[300];
|
||||||
uint16_t offset = 0;
|
uint16_t offset = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user