File: 81_subclass.t

package info (click to toggle)
libtext-csv-xs-perl 1.60-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,368 kB
  • sloc: perl: 8,771; makefile: 9
file content (27 lines) | stat: -rw-r--r-- 613 bytes parent folder | download | duplicates (6)
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
#!/usr/bin/perl

package Text::CSV_XS::Subclass;

use strict;
use warnings;

use base "Text::CSV_XS";

use Test::More tests => 6;

ok (1, "Subclassed");

my $csvs = Text::CSV_XS::Subclass->new ();
is ($csvs->error_diag (), "", "Last failure for new () - OK");

my $sc_csv;
eval { $sc_csv = Text::CSV_XS::Subclass->new ({ ecs_char => ":" }); };
is ($sc_csv, undef, "Unsupported option");
is ($@, "", "error");

is (Text::CSV_XS::Subclass->error_diag (),
    "INI - Unknown attribute 'ecs_char'", "Last failure for new () - FAIL");

is (Text::CSV_XS::Subclass->new ({ fail_me => "now" }), undef, "bad new ()");

1;