#!/usr/bin/perl -Tw
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl 2.t'
#########################
# change 'tests => 1' to 'tests => last_test_to_print';
#use Test::More tests => 4;
use Test::More 'no_plan';
#BEGIN { use_ok('Lingua::SA') };
#########################
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.
use Lingua::SA qw(transliterate);
my %transliterated_of = (
'a' => 'अ ',
'aa' => 'आ ',
'A' => 'आ ',
'i' => 'इ ',
'ii' => 'ई ',
'I' => 'ई ',
'u' => 'उ ',
'uu' => 'ऊ ',
'U' => 'ऊ ',
'e' => 'ए ',
'k' => 'क् ',
'ka' => 'क ',
'kA' => 'का ',
'kaa' => 'का ',
'ki' => 'कि ',
'kI' => 'की ',
'kii' => 'की ',
'ku' => 'कु ',
'kU' => 'कू ',
'kuu' => 'कू ',
'klR' => 'कॢ ',
'CBa' => 'ँ ',
'L' => 'ळ् ',
);
for my $word (keys %transliterated_of){
my $expected = $transliterated_of{$word};
my $computed = transliterate($word);
# my $computed = transliterate(sandhi($word));
# Test expected and computed transliteration for word equality
# is( $computed, $expected, "$word -> $expected" );
is( $computed, $expected, $expected );
}
#########################