Skip to content

Commit

Permalink
test/t_commands: add unit test for mpd_send_range_id()
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Jul 3, 2020
1 parent 688ac24 commit 1697272
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/t_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ START_TEST(test_queue_commands)
ck_assert_str_eq(test_capture_receive(&capture), "cleartagid \"42\"\n");
abort_command(&capture, c);

ck_assert(mpd_send_range_id(c, 42, 0, 666));
ck_assert_str_eq(test_capture_receive(&capture), "rangeid \"42\" \"0.000:666.000\"\n");
abort_command(&capture, c);

ck_assert(mpd_send_range_id(c, 42, 6, -1));
ck_assert_str_eq(test_capture_receive(&capture), "rangeid \"42\" \"6.000:\"\n");
abort_command(&capture, c);

mpd_connection_free(c);
test_capture_deinit(&capture);
}
Expand Down

0 comments on commit 1697272

Please sign in to comment.