]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add test for option twelve
authorBastian Dehn <hhaalo@arcor.de>
Tue, 12 Mar 2024 20:30:56 +0000 (21:30 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Tue, 12 Mar 2024 20:30:56 +0000 (21:30 +0100)
tests/kds_s2000w_net_tests.c

index beb9fdcb748651522cac5ee50b0d3a711e653858..d026f226ead36ab72f28cba9e979fb5baa2069e3 100644 (file)
@@ -281,6 +281,22 @@ START_TEST(sane_kds_s2000w_net_control_get_option_eleven)
 }
 END_TEST
 
+START_TEST(sane_kds_s2000w_net_control_get_option_twelve)
+{
+       handler* h = init_handler();
+       int option_num = 0;
+       char value[50] = {0};
+
+       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
+       _sane_kds_s2000w_net_control_option(h, 12, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       ck_assert_int_eq(option_num, 24);
+       ck_assert_str_eq(value, "Automatic");
+       free_handler(h);
+       h = NULL;
+}
+END_TEST
+
 Suite* net_tests()
 {
        Suite* net_tests_suite = suite_create("kds_s2000w_net");
@@ -301,6 +317,7 @@ Suite* net_tests()
        tcase_add_test(net_tests, sane_kds_s2000w_net_control_get_option_nine);
        tcase_add_test(net_tests, sane_kds_s2000w_net_control_get_option_ten);
        tcase_add_test(net_tests, sane_kds_s2000w_net_control_get_option_eleven);
+       tcase_add_test(net_tests, sane_kds_s2000w_net_control_get_option_twelve);
        suite_add_tcase(net_tests_suite, net_tests);
        return net_tests_suite;
 }
\ No newline at end of file