From 4130f88091d2c97250a1a84ba3d44c7fffbc194d Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Tue, 12 Mar 2024 21:01:16 +0100 Subject: [PATCH] make right test for option zero --- tests/kds_s2000w_net_tests.c | 39 ++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/tests/kds_s2000w_net_tests.c b/tests/kds_s2000w_net_tests.c index 8f1ca3b..d845d92 100644 --- a/tests/kds_s2000w_net_tests.c +++ b/tests/kds_s2000w_net_tests.c @@ -8,7 +8,42 @@ int kds_s2000w_client_get_option(int64_t sessionid, response* response) { - response->data = "{\"Configuration\":{\"testproperty\": 0, \"testproperty2\": 0}}"; + response->data = "{ \ + \"Status\": { \ + \"NumImagesScanned\": 0, \ + \"NumImagesStored\": 0, \ + \"State\": \"In Session\", \ + \"ErrorNum\": 0, \ + \"LastError\": \"Status: 200 Success\", \ + \"PaperDetected\": \"0\", \ + \"PercentAvailable\": 99 \ + }, \ + \"Configuration\": { \ + \"DPI\": 200, \ + \"ScanSide\": \"Duplex\", \ + \"ColorMode\": \"Color\", \ + \"SkipBlankPages\": 0, \ + \"AutoStart\": 0, \ + \"ColorDropOut\": \"None\", \ + \"ColorDropOutAggressiveness\": 0, \ + \"OutputType\": \"Images\", \ + \"ColorAutoBrightnessMode\": \"Automatic\", \ + \"ColorBalanceMode\": \"Automatic\", \ + \"ColorBalanceAggressiveness\": 0, \ + \"ColorBalanceRed\": 0, \ + \"ColorBalanceGreen\": 0, \ + \"ColorBalanceBlue\": 0, \ + \"ForegroundBoldnessMode\": \"None\", \ + \"ForegroundBoldnessAggressiveness\": 0, \ + \"BackgroundSmoothingMode\": \"None\", \ + \"BackgroundSmoothingAggressiveness\": 0, \ + \"BinarizationMode\": \"iThresholding\", \ + \"BinarizationContrast\": 0, \ + \"MaxDocumentLength\": 140, \ + \"ScanSource\": \"DocumentFeeder\" \ + } \ + }"; + response->code = 200; response->size = sizeof(response->data); @@ -96,7 +131,7 @@ START_TEST(sane_kds_s2000w_net_control_option_zero) _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &value, NULL); - ck_assert_int_eq(value, 4); + ck_assert_int_eq(value, 24); free_handler(h); h = NULL; } -- 2.39.5