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

index 8f1ca3b336be6304a5e0870473ae2526d8f0fdb8..d845d92f24d5c1c79bf1d8b4873a4a40c52ddcc6 100644 (file)
@@ -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;
 }