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') };
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::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',
32
'tip' => 'Selects the scan mode (e.g., lineart, monochrome, or color).',
34
'values' => ['Lineart','Gray','Color']
37
'tip' => 'Selects what red radiance level should be considered "black".',
38
'default' => 'inactive',
42
'scan-exposure-time-g' => {
43
'tip' => 'Define exposure-time for green scan',
44
'default' => 'inactive',
48
'scan-exposure-time-r' => {
49
'tip' => 'Define exposure-time for red scan',
50
'default' => 'inactive',
55
'tip' => 'Turn on scanner lamp',
56
'default' => 'inactive',
58
'lens-calibration-in-doc-position' => {
59
'tip' => 'Calibrate lens focus in document position',
60
'default' => 'inactive',
61
'values' => ['yes','no']
64
'tip' => 'In RGB-mode use same values for each color',
66
'values' => ['yes','no']
69
'tip' => 'Analog gamma-correction',
70
'default' => 'inactive',
75
'manual-pre-focus' => {
77
'default' => 'inactive',
78
'values' => ['yes','no']
80
'scan-exposure-time-b' => {
81
'tip' => 'Define exposure-time for blue scan',
82
'default' => 'inactive',
87
'tip' => 'Analog gamma-correction for blue',
88
'default' => 'inactive',
94
'tip' => 'Selects what radiance level should be considered "black".',
95
'default' => 'inactive',
100
'tip' => 'Sets the size of the halftoning (dithering) pattern used when scanning halftoned images.',
101
'default' => 'inactive',
102
'values' => ['2','4','6','8','12pel']
105
'tip' => 'Do a quality white-calibration',
107
'values' => ['yes','no']
109
'cal-exposure-time-r' => {
110
'tip' => 'Define exposure-time for red calibration',
111
'default' => 'inactive',
116
'tip' => 'Number of bits per sample, typical values are 1 for "line-art" and 8 for multibit scans.',
121
'tip' => 'Warmup lamp before scanning',
122
'default' => 'inactive',
123
'values' => ['yes','no']
125
'fix-focus-position' => {
127
'default' => 'inactive',
128
'values' => ['yes','no']
131
'tip' => 'Controls the brightness of the acquired image.',
132
'default' => 'inactive',
138
'tip' => 'Selects what green radiance level should be considered "full green".',
143
'analog-gamma-r' => {
144
'tip' => 'Analog gamma-correction for red',
145
'default' => 'inactive',
148
'step' => 0.00999451,
151
'tip' => 'Sets the vertical resolution of the scanned image.',
152
'default' => 'inactive',
158
'tip' => 'Request a preview-quality scan.',
160
'values' => ['yes','no']
163
'tip' => 'Sets the resolution of the scanned image.',
170
'tip' => 'Swap black and white',
171
'default' => 'inactive',
172
'values' => ['yes','no']
174
'batch-scan-end' => {
175
'tip' => 'set for last scan of batch',
176
'default' => 'inactive',
177
'values' => ['yes','no']
180
'tip' => 'Selects the scan source (such as a document-feeder).',
181
'default' => 'Flatbed',
182
'values' => ['Flatbed']
184
'scan-exposure-time' => {
185
'tip' => 'Define exposure-time for scan',
186
'default' => 'inactive',
191
'tip' => 'Select minimum-brightness to get a white point',
192
'default' => 'inactive',
197
'tip' => 'Selects what red radiance level should be considered "full red".',
202
'batch-scan-loop' => {
203
'tip' => 'set for middle scans of batch',
204
'default' => 'inactive',
205
'values' => ['yes','no']
208
'tip' => 'Determines whether a builtin or a custom gamma-table should be used.',
210
'values' => ['yes','no']
213
'tip' => 'Selects what green radiance level should be considered "black".',
214
'default' => 'inactive',
218
'batch-scan-start' => {
219
'tip' => 'set for first scan of batch',
220
'default' => 'inactive',
221
'values' => ['yes','no']
223
'batch-scan-next-tl-y' => {
224
'tip' => 'Set top left Y position for next scan',
225
'default' => 'inactive',
229
'resolution-bind' => {
230
'tip' => 'Use same values for X and Y resolution',
232
'values' => ['yes','no']
234
'cal-exposure-time-b' => {
235
'tip' => 'Define exposure-time for blue calibration',
236
'default' => 'inactive',
241
'tip' => 'Selects what blue radiance level should be considered "full blue".',
246
'disable-pre-focus' => {
247
'tip' => 'Do not calibrate focus',
248
'default' => 'inactive',
249
'values' => ['yes','no']
252
'tip' => 'Selects what radiance level should be considered "white".',
253
'default' => 'inactive',
258
'tip' => 'Use lens that doubles optical resolution',
259
'default' => 'inactive',
260
'values' => ['yes','no']
262
'select-lamp-density' => {
263
'tip' => 'Enable selection of lamp density',
264
'default' => 'inactive',
265
'values' => ['yes','no']
268
'tip' => 'Selects what blue radiance level should be considered "black".',
269
'default' => 'inactive',
274
'tip' => 'Turn off scanner lamp',
275
'default' => 'inactive',
277
'cal-exposure-time-g' => {
278
'tip' => 'Define exposure-time for green calibration',
279
'default' => 'inactive',
283
'scan-lamp-density' => {
284
'tip' => 'Define lamp density for scan',
285
'default' => 'inactive',
289
'analog-gamma-g' => {
290
'tip' => 'Analog gamma-correction for green',
291
'default' => 'inactive',
294
'step' => 0.00999451,
297
'tip' => 'Controls the contrast of the acquired image.',
298
'default' => 'inactive',
303
'cal-exposure-time' => {
304
'tip' => 'Define exposure-time for calibration',
305
'default' => 'inactive',
309
'lamp-off-at-exit' => {
310
'tip' => 'Turn off lamp when program exits',
311
'default' => 'inactive',
312
'values' => ['yes','no']
314
'select-calibration-exposure-time' => {
315
'tip' => 'Allow different settings for calibration and scan exposure times',
316
'default' => 'inactive',
317
'values' => ['yes','no']
319
'halftone-pattern' => {
320
'tip' => 'Defines the halftoning (dithering) pattern for scanning halftoned images.',
321
'default' => 'inactive',
325
'select-exposure-time' => {
326
'tip' => 'Enable selection of exposure-time',
327
'default' => 'inactive',
328
'values' => ['yes','no']
331
'tip' => 'Top-left x position of scan area.',
337
'tip' => 'Top-left y position of scan area.',
343
'tip' => 'Width of scan-area.',
349
'tip' => 'Height of scan-area.',
355
is_deeply(\%this, \%that, 'umax');