epic-s6ts
[kivitendo-erp.git] / t / datev / encoding.t
1 use strict;
2 use Test::More;
3
4 use lib 't';
5
6 use_ok 'Support::TestSetup';
7 use SL::DATEV::CSV qw(check_text);
8 use Support::TestSetup;
9
10 use utf8;
11 Support::TestSetup::login();
12
13 my $ascii    = 'foobar 443334 hallo';
14 my $german   = 'üßäüö €';
15 my $croatia  = 'Kulašić hat viele €';
16 my $armenian = 'Հայերեն  ֏';
17
18 is 1,     SL::DATEV::CSV::check_encoding($ascii),    'ASCII Encoding';
19 is 1,     SL::DATEV::CSV::check_encoding($german),   'German umlaut, euro and ligatur Encoding';
20 is undef, SL::DATEV::CSV::check_encoding($croatia),  'croatia with euro Encoding';
21 is undef, SL::DATEV::CSV::check_encoding($armenian), 'armenian Encoding';
22
23 done_testing;