<commit_before>#!/usr/bin/env perl

use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;

zci answer_type => 'helpline';

ddg_goodie_test(
	[qw(
		DDG::Goodie::HelpLine
	)],
	'suicide' => test_zci(qr/24 Hour Suicide Hotline: [\d\-){7}]/),
);

done_testing;
<commit_msg>abstract helpline tests for geoip location based testing<commit_after>#!/usr/bin/env perl

use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
use DDG::Test::Location;
use DDG::Request;

zci answer_type => 'helpline';

my @queries = (
    'suicide'
);

my @locations = (
    'us',
);

ddg_goodie_test(
	[qw(
		DDG::Goodie::HelpLine
	)],
    DDG::Request->new(
        query_raw => "$queries[0]",
        location => test_location($locations[0])
    ),
	test_zci(qr/24 Hour Suicide Hotline: [\d\-){7}]/),
);

done_testing;

{'fraction_non_alphanumeric': 0.18259803921568626, 'fraction_numerical': 0.00980392156862745, 'mean_word_length': 4.339869281045751, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6906709', 'n_tokens_mistral': 352, 'n_tokens_neox': 331, 'n_words': 67}