File: 1.t

package info (click to toggle)
liblingua-en-findnumber-perl 1.32-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 112 kB
  • ctags: 3
  • sloc: perl: 26; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 407 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
use Test::More tests => 4;
use_ok("Lingua::EN::FindNumber");

ok($number_re, "Exported the regular expression");

my $text = "Fourscore and seven years ago, our four fathers...";

is(numify($text), "87 years ago, our 4 fathers...", "numify");
@numbers = extract_numbers($text); 
is_deeply(\@numbers, ["Fourscore and seven", "four"], "extract_numbers");

my $x = $number_re; #quiet warnings
$number_re = $x;