diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-05-02 15:24:22 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-05-02 15:24:22 +0100 |
commit | 2e0b89b33d4c9944440bba49e6926a51b46d02c3 (patch) | |
tree | 2a28075d9b7459b469afb1988572cb61f4221881 /test/tc_mauve_configuration.rb | |
parent | e55096b063720e0be4ca8d774095d2f6dfb7c086 (diff) | |
parent | c697cea61321a8b292b4e353afc9dbff8a552b94 (diff) |
merge
Diffstat (limited to 'test/tc_mauve_configuration.rb')
-rw-r--r-- | test/tc_mauve_configuration.rb | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/tc_mauve_configuration.rb b/test/tc_mauve_configuration.rb new file mode 100644 index 0000000..bbc1901 --- /dev/null +++ b/test/tc_mauve_configuration.rb @@ -0,0 +1,38 @@ +$:.unshift "../lib/" + +require 'th_mauve' +require 'mauve/configuration' + +class TcMauveConfiguration < Mauve::UnitTest + include Mauve + + def setup + setup_logger + end + + def teardown + teardown_logger + end + + def test_do_parse_range + [ + [[1.0...2.0], 1], + [[1.0...3.0], 1..2], + [[1.0...2.0], 1...2], + [[1.0...2.0, 4.0...7.0], [1, 4..6]], + [[1.0..1.0], 1.0], + [[1.0..2.0], 1.0..2.0], + [[1.0...2.0], 1.0...2.0], + [[1.0..1.0, 4.0..6.0], [1.0, 4.0..6.0]], + [[7.0...24.0, 0.0...7.0], 7..6], + [[6.0...7.0, 0.0...1.0], 6..0, 0...7], + [["x".."z", "a".."c"], "x".."c", "a".."z"] + ].each do |output, *input| + c = Configuration.new + assert_equal(output, c.__send__("do_parse_range",*input)) + end + end + +end + + |