@ -71,13 +72,49 @@ cmp_ok($an->data->{foo}{baz}{2}, 'eq', 'I had a $dollar = sign and split with ta
### AN::Tools::Words methods
# Make sure we can read words files
is($an->Words->read({file=>$an->data->{path}{words}{'an-tools.xml'}}),0,"Verifying that '\$an->Words->read' properly returned '0' when asked to read the AN::Tools's words file.");
is($an->Words->read({file=>$an->data->{path}{words}{'an-tools.xml'}}),0,"Verifying that '\$an->Words->read' properly returned '0' when asked to read the AN::Tools's words file.");
is($an->Words->read({file=>''}),1,"Verifying that '\$an->Words->read' properly returned '1' when asked to read a works file without a file being passed.");
is($an->Words->read({file=>'/tmp/dummy.xml'}),2,"Verifying that '\$an->Words->read' properly returned '2' when asked to read a non-existent file.");
### NOTE: At this time, we don't test for unreadable files (rc = 3) or general read faults as set by XML::Simple (rc = 4).
# Make sure we can read strings.
# Make sure we can read raw strings.
is($an->Words->key({key=>'t_0001'}),"Test replace: [#!variable!test!#].","Verifying that '\$an->Words->key' returned the Canadian English 't_0001' string.");
is($an->Words->key({key=>'t_0001',language=>'jp'}),"テスト いれかえる: [#!variable!test!#]。","Verifying that '\$an->Words->read' returned the Japanese 't_0001' string.");
is($an->Words->key({key=>'t_0003',language=>'jp'}),"#!not_found!#","Verifying that '\$an->Words->read' returned '#!not_found!#' for the missing 't_0003' key.");