<commit_before>
#! /usr/local/bin/ruby -w

require 'RMagick'
require 'test/unit'
require 'test/unit/ui/console/testrunner'


class Info_UT < Test::Unit::TestCase

    def setup
        @info = Magick::Image::Info.new
    end

    def test_options
        assert_nothing_raised { @info['tiff', 'bits-per-sample'] = 2 }
        assert_equal("2", @info['tiff', 'bits-per-sample'])

        assert_nothing_raised { @info.define('tiff', 'bits-per-sample', 4) }
        assert_equal("4", @info['tiff', 'bits-per-sample'])

        assert_nothing_raised { @info.undefine('tiff', 'bits-per-sample') }
        assert_nil(@info['tiff', 'bits-per-sample'])
    end
end<commit_msg>Test new fill=, stroke=, and undercolor= attributes<commit_after>
#! /usr/local/bin/ruby -w

require 'RMagick'
require 'test/unit'
require 'test/unit/ui/console/testrunner'


class Info_UT < Test::Unit::TestCase

    def setup
        @info = Magick::Image::Info.new
    end

    def test_options
        assert_nothing_raised { @info['tiff', 'bits-per-sample'] = 2 }
        assert_equal("2", @info['tiff', 'bits-per-sample'])

        assert_nothing_raised { @info.define('tiff', 'bits-per-sample', 4) }
        assert_equal("4", @info['tiff', 'bits-per-sample'])

        assert_nothing_raised { @info.undefine('tiff', 'bits-per-sample') }
        assert_nil(@info['tiff', 'bits-per-sample'])
    end

    def test_fill
        assert_nothing_raised { @info.fill }
        assert_nil(@info.fill)

        assert_nothing_raised { @info.fill = 'white' }
        assert_equal("white", @info.fill)

        assert_nothing_raised { @info.fill = nil }
        assert_nil(@info.fill)

        assert_raise(ArgumentError) { @info.fill = 'xxx' }
    end

    def test_fill
        assert_nothing_raised { @info.fill }
        assert_nil(@info.fill)

        assert_nothing_raised { @info.fill = 'white' }
        assert_equal("white", @info.fill)

        assert_nothing_raised { @info.fill = nil }
        assert_nil(@info.fill)

        assert_raise(ArgumentError) { @info.fill = 'xxx' }
    end

    def test_stroke
        assert_nothing_raised { @info.stroke }
        assert_nil(@info.stroke)

        assert_nothing_raised { @info.stroke = 'white' }
        assert_equal("white", @info.stroke)

        assert_nothing_raised { @info.stroke = nil }
        assert_nil(@info.stroke)

        assert_raise(ArgumentError) { @info.stroke = 'xxx' }
    end

    def test_undercolor
        assert_nothing_raised { @info.undercolor }
        assert_nil(@info.undercolor)

        assert_nothing_raised { @info.undercolor = 'white' }
        assert_equal("white", @info.undercolor)

        assert_nothing_raised { @info.undercolor = nil }
        assert_nil(@info.undercolor)

        assert_raise(ArgumentError) { @info.undercolor = 'xxx' }
    end

end
{'fraction_non_alphanumeric': 0.1402200922967696, 'fraction_numerical': 0.0028399006034788782, 'mean_word_length': 2.8602739726027395, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '2300647', 'n_tokens_mistral': 970, 'n_tokens_neox': 901, 'n_words': 157}