Genealogy-Occupation

 view release on metacpan or  search on metacpan

t/edge_cases.t  view on Meta::CPAN

# so that individual test environment locale cannot affect results.
# Returns ($obj, $guard); caller must keep $guard in scope.
sub _en {
	my %args   = @_;
	delete local $ENV{LANGUAGE};
	delete local $ENV{LC_ALL};
	delete local $ENV{LC_MESSAGES};
	local $ENV{LANG} = 'en_GB.UTF-8';
	my $guard  = mock_scoped('I18N::LangTags::Detect::detect' => sub { () });
	my $obj    = Genealogy::Occupation->new(%args);
	# Return guard separately so the caller can keep it alive past return
	return ($obj, $guard);
}

# -----------------------------------------------------------------------
# String-cleaning step boundary conditions
# The cleaning pipeline runs in this order:
#   tr/\r\n/ /   -> s/\.+$//   -> s/[\(\)]//g ->
#   s/\s\s+/ /g  -> s/\s+$//   -> s/\./;/g
# -----------------------------------------------------------------------



( run in 4.786 seconds using v1.01-cache-2.11-cpan-14f38c9f855 )