Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 41 lines (38 sloc) 0.778 kb
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 34 35 36 37 38 39 40 41
BEGIN { $| = 1; print "1..6\n"; }
END {print "not ok 1\n" unless $loaded;}
use C4::Koha;
$loaded = 1;
print "ok 1\n";

#
# test that &slashifyDate returns correct (non-US) date
#
$date = "01/01/2002";
$newdate = &slashifyDate("2002-01-01");

if ($date eq $newdate) {
    print "ok 2\n";
} else {
    print "not ok 2\n";
}

#
# Check that &fixEthnicity returns correct values
#
if ('Maori' eq fixEthnicity('maori')) {
    print "ok 3\n";
} else {
    print "not ok 3\n";
}
if ('European/Pakeha' eq fixEthnicity('european')) {
    print "ok 4\n";
} else {
    print "not ok 4\n";
}
if ('Pacific Islander' eq fixEthnicity('pi')) {
    print "ok 5\n";
} else {
    print "not ok 5\n";
}
if ('Asian' eq fixEthnicity('asian')) {
    print "ok 6\n";
} else {
    print "not ok 6\n";
}
Something went wrong with that request. Please try again.