summaryrefslogtreecommitdiff
path: root/t/input.t
blob: 91e8afc8f106a5c6a9371fd85a68ba944cba6461 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!perl 
use strict;
use warnings;
use Test2::Bundle::Extended;
use Data::QRCode::Input;
 
my $input = Data::QRCode::Input->new();
 
$input->version(12);
$input->error_correction_level(Data::QRCode::Input::ECLEVEL_M);
 
is(
    $input->version,
    12,
    'version should round-trip',
);
 
is(
    $input->error_correction_level,
    Data::QRCode::Input::ECLEVEL_M,
    'ec level should round-trip',
);
 
is(
    $input->append(
        Data::QRCode::Input::MODE_8,
        'some data',
    ),
    0,
    'append should work and return 0 on success',
);
 
done_testing;