~ubuntu-branches/debian/sid/gscan2pdf/sid

« back to all changes in this revision

Viewing changes to t/02_Frontend_Scanimage_canoscan_FB_630P.t

  • Committer: Package Import Robot
  • Author(s): Jeffrey Ratcliffe
  • Date: 2012-02-05 22:13:28 UTC
  • mfrom: (1.3.7)
  • Revision ID: package-import@ubuntu.com-20120205221328-lbe6imlt2nymnk7o
Tags: 1.0.1-1
* New upstream release
  Closes: #653918 (gscan2pdf doesn't save metadata anymore)
  Closes: #646298 (pdf-exports of ocropus texts are slow, big)
  Closes: #646246 (gscan2pdf ignores html-entities returned by ocropus
                   documents)
  Closes: #651666 (ability to preview saved files)
  Closes: #645322 (No lock after recovery can result in data loss)
  Closes: #645323 (Imported pages have no thumbnails)
* Bumped standards to 3.9.2 (no changes required)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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'
 
3
 
 
4
#########################
 
5
 
 
6
# change 'tests => 1' to 'tests => last_test_to_print';
 
7
 
 
8
use warnings;
 
9
use strict;
 
10
use Test::More tests => 2;
 
11
BEGIN { use_ok('Gscan2pdf::Frontend::Scanimage') }
 
12
 
 
13
#########################
 
14
 
 
15
# Insert your test code below, the Test::More module is use()ed here so read
 
16
# its man page ( perldoc Test::More ) for help writing this test script.
 
17
 
 
18
my $filename = 'scanners/canoscan_FB_630P';
 
19
my $output   = do { local ( @ARGV, $/ ) = $filename; <> };
 
20
my %this     = Gscan2pdf::Frontend::Scanimage::options2hash($output);
 
21
my %that     = (
 
22
 'mode' => {
 
23
  'tip'     => 'Selects the scan mode (e.g., lineart, monochrome, or color).',
 
24
  'default' => 'Gray',
 
25
  'values'  => [ 'Gray', 'Color' ]
 
26
 },
 
27
 'resolution' => {
 
28
  'tip'     => 'Sets the resolution of the scanned image.',
 
29
  'default' => '75',
 
30
  'values'  => [ '75', '150', '300', '600' ],
 
31
  'unit'    => 'dpi',
 
32
 },
 
33
 'quality-cal' => {
 
34
  'tip'     => 'Do a quality white-calibration',
 
35
  'default' => '',
 
36
 },
 
37
 'depth' => {
 
38
  'tip' =>
 
39
'Number of bits per sample, typical values are 1 for "line-art" and 8 for multibit scans.',
 
40
  'default' => '8',
 
41
  'values'  => [ '8', '12' ]
 
42
 },
 
43
 'l' => {
 
44
  'tip'     => 'Top-left x position of scan area.',
 
45
  'default' => 0,
 
46
  'min'     => 0,
 
47
  'max'     => 215,
 
48
  'step'    => 1869504867,
 
49
  'unit'    => 'mm',
 
50
 },
 
51
 't' => {
 
52
  'tip'     => 'Top-left y position of scan area.',
 
53
  'default' => 0,
 
54
  'min'     => 0,
 
55
  'max'     => 296,
 
56
  'step'    => 1852795252,
 
57
  'unit'    => 'mm',
 
58
 },
 
59
 'x' => {
 
60
  'tip'     => 'Width of scan-area.',
 
61
  'default' => 100,
 
62
  'min'     => 3,
 
63
  'max'     => 216,
 
64
  'step'    => 16,
 
65
  'unit'    => 'mm',
 
66
 },
 
67
 'y' => {
 
68
  'tip'     => 'Height of scan-area.',
 
69
  'default' => 100,
 
70
  'min'     => 1,
 
71
  'max'     => 297,
 
72
  'unit'    => 'mm',
 
73
 }
 
74
);
 
75
is_deeply( \%this, \%that, 'canoscan_FB_630P' );