X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44..53593baa211863fbf66540cf1bcc36c8fb37257f:/t/datev/encoding.t diff --git a/t/datev/encoding.t b/t/datev/encoding.t new file mode 100644 index 000000000..3c3369a6b --- /dev/null +++ b/t/datev/encoding.t @@ -0,0 +1,23 @@ +use strict; +use Test::More; + +use lib 't'; + +use_ok 'Support::TestSetup'; +use SL::DATEV::CSV qw(check_text); +use Support::TestSetup; + +use utf8; +Support::TestSetup::login(); + +my $ascii = 'foobar 443334 hallo'; +my $german = 'üßäüö €'; +my $croatia = 'Kulašić hat viele €'; +my $armenian = 'Հայերեն ֏'; + +is 1, SL::DATEV::CSV::check_encoding($ascii), 'ASCII Encoding'; +is 1, SL::DATEV::CSV::check_encoding($german), 'German umlaut, euro and ligatur Encoding'; +is undef, SL::DATEV::CSV::check_encoding($croatia), 'croatia with euro Encoding'; +is undef, SL::DATEV::CSV::check_encoding($armenian), 'armenian Encoding'; + +done_testing;