]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add test auto option unsupported
authorBastian Dehn <hhaalo@arcor.de>
Sat, 8 Nov 2025 17:05:48 +0000 (18:05 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 8 Nov 2025 17:05:48 +0000 (18:05 +0100)
src/kds_s2000w_net.c
tests/kds_s2000w_net_tests.c

index 92ac44b37aa2c3be772743db29d458db1f7387a5..744e0d68fbffcfe93025f2dec85279907d279b1a 100644 (file)
@@ -132,7 +132,7 @@ SANE_Status sane_kds_s2000w_net_control_option(SANE_Handle handle,
        if (action == SANE_ACTION_SET_VALUE)
                return kds_s2000w_handler_opts_set_option(h, option, value, info);
 
-       return SANE_STATUS_GOOD;
+       return SANE_STATUS_UNSUPPORTED;
 }
 
 
index 7642251da53dcf6d6b8fb8d80323d22e15adb7ee..5f1a447bdc6b0922a40691030c1568d4230b9310 100644 (file)
@@ -766,6 +766,13 @@ void sane_kds_s2000w_net_cancel_completed_scan_flatbed_test()
        h = NULL;
 }
 
+void kds_s2000w_net_control_option_unsupported_test()
+{
+       SANE_Status result = sane_kds_s2000w_net_control_option(NULL, 0, SANE_ACTION_SET_AUTO, NULL, NULL);
+
+       assert_int_equal(result, SANE_STATUS_UNSUPPORTED);
+}
+
 void kds_s2000w_net_set_io_mode_test()
 {
        SANE_Status result = sane_kds_s2000w_net_set_io_mode(NULL, SANE_FALSE);
@@ -804,6 +811,7 @@ int main()
                cmocka_unit_test(sane_kds_s2000w_net_cancel_canceled_test),
                cmocka_unit_test(sane_kds_s2000w_net_cancel_completed_scan_feeder_test),
                cmocka_unit_test(sane_kds_s2000w_net_cancel_completed_scan_flatbed_test),
+               cmocka_unit_test(kds_s2000w_net_control_option_unsupported_test),
                cmocka_unit_test(kds_s2000w_net_set_io_mode_test),
                cmocka_unit_test(kds_s2000w_net_get_select_fd_test)
        };