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

use strict;
use warnings;
use Test::More;
use URI::Escape;
use DDG::Test::Location;
use DDG::Test::Spice;
use DDG::Request;

my $loc = test_location('de');

ddg_spice_test(
    ['DDG::Spice::Forecast'],
    DDG::Request->new(
        query_raw => 'weather forecast',
        location => $loc
    ) => test_spice(
        # "/js/spice/forecast/${\$loc->latitude}%2C${\$loc->longitude}",
        "/js/spice/forecast/" . uri_escape_utf8(${\$loc->loc_str}),
        call_type => 'include',
        caller => 'DDG::Spice::Forecast',
        is_cached => 0
    ),
    'weather for Troy, NY' => test_spice(
    	'/js/spice/forecast/troy%2C%20ny',
    	call_type => 'include',
    	caller => 'DDG::Spice::Forecast',
        is_cached => 1
    ),
    'Philadelphia weather' => test_spice(
    	'/js/spice/forecast/philadelphia',
    	call_type => 'include',
    	caller => 'DDG::Spice::Forecast',
        is_cached => 1
    ),
    'Philadelphia weather forecast' => test_spice(
    	'/js/spice/forecast/philadelphia',
    	call_type => 'include',
    	caller => 'DDG::Spice::Forecast',
        is_cached => 1
    ),
    'Philadelphia weather this week' => test_spice(
    	'/js/spice/forecast/philadelphia',
    	call_type => 'include',
    	caller => 'DDG::Spice::Forecast',
        is_cached => 1
    ),
    'what is the weather in new york' => test_spice(
    	'/js/spice/forecast/new%20york',
    	call_type => 'include',
    	caller => 'DDG::Spice::Forecast',
        is_cached => 1
    ),
);

done_testing;<commit_msg>t/Forecast.t: disable tests that break unless the trigger is an 'any' instead of a 'startend'.<commit_after>#!/usr/bin/env perl

use strict;
use warnings;
use Test::More;
use URI::Escape;
use DDG::Test::Location;
use DDG::Test::Spice;
use DDG::Request;

my $loc = test_location('de');

ddg_spice_test(
    ['DDG::Spice::Forecast'],
    DDG::Request->new(
        query_raw => 'weather forecast',
        location => $loc
    ) => test_spice(
        # "/js/spice/forecast/${\$loc->latitude}%2C${\$loc->longitude}",
        "/js/spice/forecast/" . uri_escape_utf8(${\$loc->loc_str}),
        call_type => 'include',
        caller => 'DDG::Spice::Forecast',
        is_cached => 0
    ),
    'weather for Troy, NY' => test_spice(
    	'/js/spice/forecast/troy%2C%20ny',
    	call_type => 'include',
    	caller => 'DDG::Spice::Forecast',
        is_cached => 1
    ),
    'Philadelphia weather' => test_spice(
    	'/js/spice/forecast/philadelphia',
    	call_type => 'include',
    	caller => 'DDG::Spice::Forecast',
        is_cached => 1
    ),
    'Philadelphia weather forecast' => test_spice(
    	'/js/spice/forecast/philadelphia',
    	call_type => 'include',
    	caller => 'DDG::Spice::Forecast',
        is_cached => 1
    ),

# Disabling since I made the trigger a startend. (caine)
#    'Philadelphia weather this week' => test_spice(
#    	'/js/spice/forecast/philadelphia',
#    	call_type => 'include',
#    	caller => 'DDG::Spice::Forecast',
#        is_cached => 1
#    ),
#    'what is the weather in new york' => test_spice(
#    	'/js/spice/forecast/new%20york',
#    	call_type => 'include',
#    	caller => 'DDG::Spice::Forecast',
#        is_cached => 1
#    ),
);

done_testing;
{'fraction_non_alphanumeric': 0.17829695665539502, 'fraction_numerical': 0.007992622194897018, 'mean_word_length': 2.883054892601432, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 63, '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': '563530', 'n_tokens_mistral': 1244, 'n_tokens_neox': 1198, 'n_words': 218}