Browse Source

Bug 9859: Follow-up - Adding a simple unit test for nsb_clean

This tests uses the example given on the perl file on the
bug report.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
MM-OPAC/theme_dep
Katrin Fischer 10 years ago
committed by Tomas Cohen Arazi
parent
commit
a7e9535629
  1. 7
      t/Charset.t

7
t/Charset.t

@ -17,9 +17,12 @@
use Modern::Perl;
use Test::More tests => 10;
use Test::More tests => 11;
use MARC::Record;
use utf8;
use open ':std', ':encoding(utf8)';
BEGIN {
use_ok('C4::Charset');
}
@ -55,4 +58,6 @@ ok( utf8::is_utf8($record->subfield('100','a')) &&
utf8::is_utf8($record->subfield('245','a')),
'SetUTF8Flag sets the UTF-8 flag to all subfields' );
is( nsb_clean("˜Leœ Moyen Âge"), "Le Moyen Âge", "nsb_clean removes ˜ and œ" );
1;

Loading…
Cancel
Save