<commit_before>require_relative '../spec_helper'

describe name_from_filename do
    include_examples 'plugin'

    before( :all ) do
        issues = [Arachni::Issue.new( url: 'http://localhost' )]
        framework.modules.register_results( issues )
    end

    def results
        { 'localhost' => '127.0.0.1' }
    end

    easy_test
end<commit_msg>resolver plugin spec: updated to work with both ipv4 and ipv6 addresses<commit_after>require_relative '../spec_helper'

describe name_from_filename do
    include_examples 'plugin'

    before( :all ) do
        issues = [Arachni::Issue.new( url: 'http://localhost' )]
        framework.modules.register_results( issues )
    end

    it 'should resolve vulnerable hostnames to IP addresses' do
        run
        [{ 'localhost' => '::1' }, { 'localhost' => '127.0.0.1' }].should include( results_for( name_from_filename ))
    end

end
{'fraction_non_alphanumeric': 0.11784511784511785, 'fraction_numerical': 0.016835016835016835, 'mean_word_length': 3.0730593607305936, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4376622', 'n_tokens_mistral': 284, 'n_tokens_neox': 268, 'n_words': 71}