1
# Before `make install' is performed this script should be runnable with
2
# `make test'. After `make install' it should work as `perl Gscan2pdf.t'
4
#########################
6
# change 'tests => 1' to 'tests => last_test_to_print';
8
use Test::More tests => 2;
9
BEGIN { use_ok('Gscan2pdf::Frontend::Scanimage') };
11
#########################
13
# Insert your test code below, the Test::More module is use()ed here so read
14
# its man page ( perldoc Test::More ) for help writing this test script.
16
my $filename = 'scanners/umax';
17
my $output = do { local( @ARGV, $/ ) = $filename ; <> } ;
18
my %this = Gscan2pdf::Frontend::Scanimage::options2hash($output);
20
'holder-focus-position-0mm' => {
21
'tip' => 'Use 0mm holder focus position instead of 0.6mm',
22
'default' => 'inactive',
23
'values' => ['yes','no']
25
'cal-lamp-density' => {
26
'tip' => 'Define lamp density for calibration',
27
'default' => 'inactive',
33
'tip' => 'Selects the scan mode (e.g., lineart, monochrome, or color).',
35
'values' => ['Lineart','Gray','Color']
38
'tip' => 'Selects what red radiance level should be considered "black".',
39
'default' => 'inactive',
44
'scan-exposure-time-g' => {
45
'tip' => 'Define exposure-time for green scan',
46
'default' => 'inactive',
51
'scan-exposure-time-r' => {
52
'tip' => 'Define exposure-time for red scan',
53
'default' => 'inactive',
59
'tip' => 'Turn on scanner lamp',
60
'default' => 'inactive',
62
'lens-calibration-in-doc-position' => {
63
'tip' => 'Calibrate lens focus in document position',
64
'default' => 'inactive',
65
'values' => ['yes','no']
68
'tip' => 'In RGB-mode use same values for each color',
70
'values' => ['yes','no']
73
'tip' => 'Analog gamma-correction',
74
'default' => 'inactive',
79
'manual-pre-focus' => {
81
'default' => 'inactive',
82
'values' => ['yes','no']
84
'scan-exposure-time-b' => {
85
'tip' => 'Define exposure-time for blue scan',
86
'default' => 'inactive',
92
'tip' => 'Analog gamma-correction for blue',
93
'default' => 'inactive',
99
'tip' => 'Selects what radiance level should be considered "black".',
100
'default' => 'inactive',
106
'tip' => 'Sets the size of the halftoning (dithering) pattern used when scanning halftoned images.',
107
'default' => 'inactive',
108
'values' => ['2','4','6','8','12'],
112
'tip' => 'Do a quality white-calibration',
114
'values' => ['yes','no']
116
'cal-exposure-time-r' => {
117
'tip' => 'Define exposure-time for red calibration',
118
'default' => 'inactive',
124
'tip' => 'Number of bits per sample, typical values are 1 for "line-art" and 8 for multibit scans.',
130
'tip' => 'Warmup lamp before scanning',
131
'default' => 'inactive',
132
'values' => ['yes','no']
134
'fix-focus-position' => {
136
'default' => 'inactive',
137
'values' => ['yes','no']
140
'tip' => 'Controls the brightness of the acquired image.',
141
'default' => 'inactive',
148
'tip' => 'Selects what green radiance level should be considered "full green".',
154
'analog-gamma-r' => {
155
'tip' => 'Analog gamma-correction for red',
156
'default' => 'inactive',
159
'step' => 0.00999451,
162
'tip' => 'Sets the vertical resolution of the scanned image.',
163
'default' => 'inactive',
170
'tip' => 'Request a preview-quality scan.',
172
'values' => ['yes','no']
175
'tip' => 'Sets the resolution of the scanned image.',
183
'tip' => 'Swap black and white',
184
'default' => 'inactive',
185
'values' => ['yes','no']
187
'batch-scan-end' => {
188
'tip' => 'set for last scan of batch',
189
'default' => 'inactive',
190
'values' => ['yes','no']
193
'tip' => 'Selects the scan source (such as a document-feeder).',
194
'default' => 'Flatbed',
195
'values' => ['Flatbed']
197
'scan-exposure-time' => {
198
'tip' => 'Define exposure-time for scan',
199
'default' => 'inactive',
205
'tip' => 'Select minimum-brightness to get a white point',
206
'default' => 'inactive',
212
'tip' => 'Selects what red radiance level should be considered "full red".',
218
'batch-scan-loop' => {
219
'tip' => 'set for middle scans of batch',
220
'default' => 'inactive',
221
'values' => ['yes','no']
224
'tip' => 'Determines whether a builtin or a custom gamma-table should be used.',
226
'values' => ['yes','no']
229
'tip' => 'Selects what green radiance level should be considered "black".',
230
'default' => 'inactive',
235
'batch-scan-start' => {
236
'tip' => 'set for first scan of batch',
237
'default' => 'inactive',
238
'values' => ['yes','no']
240
'batch-scan-next-tl-y' => {
241
'tip' => 'Set top left Y position for next scan',
242
'default' => 'inactive',
247
'resolution-bind' => {
248
'tip' => 'Use same values for X and Y resolution',
250
'values' => ['yes','no']
252
'cal-exposure-time-b' => {
253
'tip' => 'Define exposure-time for blue calibration',
254
'default' => 'inactive',
260
'tip' => 'Selects what blue radiance level should be considered "full blue".',
266
'disable-pre-focus' => {
267
'tip' => 'Do not calibrate focus',
268
'default' => 'inactive',
269
'values' => ['yes','no']
272
'tip' => 'Selects what radiance level should be considered "white".',
273
'default' => 'inactive',
279
'tip' => 'Use lens that doubles optical resolution',
280
'default' => 'inactive',
281
'values' => ['yes','no']
283
'select-lamp-density' => {
284
'tip' => 'Enable selection of lamp density',
285
'default' => 'inactive',
286
'values' => ['yes','no']
289
'tip' => 'Selects what blue radiance level should be considered "black".',
290
'default' => 'inactive',
296
'tip' => 'Turn off scanner lamp',
297
'default' => 'inactive',
299
'cal-exposure-time-g' => {
300
'tip' => 'Define exposure-time for green calibration',
301
'default' => 'inactive',
306
'scan-lamp-density' => {
307
'tip' => 'Define lamp density for scan',
308
'default' => 'inactive',
313
'analog-gamma-g' => {
314
'tip' => 'Analog gamma-correction for green',
315
'default' => 'inactive',
318
'step' => 0.00999451,
321
'tip' => 'Controls the contrast of the acquired image.',
322
'default' => 'inactive',
328
'cal-exposure-time' => {
329
'tip' => 'Define exposure-time for calibration',
330
'default' => 'inactive',
335
'lamp-off-at-exit' => {
336
'tip' => 'Turn off lamp when program exits',
337
'default' => 'inactive',
338
'values' => ['yes','no']
340
'select-calibration-exposure-time' => {
341
'tip' => 'Allow different settings for calibration and scan exposure times',
342
'default' => 'inactive',
343
'values' => ['yes','no']
345
'halftone-pattern' => {
346
'tip' => 'Defines the halftoning (dithering) pattern for scanning halftoned images.',
347
'default' => 'inactive',
351
'select-exposure-time' => {
352
'tip' => 'Enable selection of exposure-time',
353
'default' => 'inactive',
354
'values' => ['yes','no']
357
'tip' => 'Top-left x position of scan area.',
364
'tip' => 'Top-left y position of scan area.',
371
'tip' => 'Width of scan-area.',
378
'tip' => 'Height of scan-area.',
385
is_deeply(\%this, \%that, 'umax');