Skip to content

Commit 655abd8

Browse files
JordanYateshenrikbrixandersen
authored andcommitted
tests: modem: chat: test modem_chat_is_running
Add tests for `modem_chat_is_running`. Signed-off-by: Jordan Yates <[email protected]>
1 parent 83375a8 commit 655abd8

File tree

1 file changed

+3
-0
lines changed
  • tests/subsys/modem/modem_chat/src

1 file changed

+3
-0
lines changed

tests/subsys/modem/modem_chat/src/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,10 @@ ZTEST(modem_chat, test_script_chat_timeout_cmd)
635635
int ret;
636636
bool called;
637637

638+
zassert_false(modem_chat_is_running(&cmd));
638639
zassert_ok(modem_chat_run_script_async(&cmd, &script_timeout_cmd),
639640
"Failed to start script");
641+
zassert_true(modem_chat_is_running(&cmd));
640642
k_msleep(100);
641643

642644
/*
@@ -672,6 +674,7 @@ ZTEST(modem_chat, test_script_chat_timeout_cmd)
672674
*/
673675
modem_backend_mock_put(&mock, ok_response, sizeof(ok_response) - 1);
674676
k_msleep(100);
677+
zassert_false(modem_chat_is_running(&cmd));
675678

676679
called = atomic_test_bit(&callback_called, MODEM_CHAT_UTEST_ON_SCRIPT_CALLBACK_BIT);
677680
zassert_true(called == true, "Script callback should have been called");

0 commit comments

Comments
 (0)