Sha256: ddb68b6ed7670ea890e94b6cf5141e9a7db9f2e6aea65c280412976d36b57143
Contents?: true
Size: 1.11 KB
Versions: 27
Compression:
Stored size: 1.11 KB
Contents
# -*- coding: utf-8 -*- # # @file # @brief # @author ongaeshi # @date 2010/10/21 require 'test_helper' require 'milkode/cdweb/lib/mkurl' module Milkode class TestMkurl < Test::Unit::TestCase def test_basic p1 = {:query => 'test', :shead => 'package', :page => '2'} p2 = {:query => 'test', :page => '2'} p3 = {:page => '2'} assert_equal '/home/foo/bar.hpp?query=test&shead=package', Mkurl.new('/home/foo/bar.hpp', p1).inherit_query_shead assert_equal '.?query=test&shead=package', Mkurl.new('.', p1).inherit_query_shead assert_equal '/home/foo/bar.hpp?query=test', Mkurl.new('/home/foo/bar.hpp', p2).inherit_query_shead assert_equal '/home/foo/bar.hpp', Mkurl.new('/home/foo/bar.hpp', p3).inherit_query_shead assert_equal '/home/foo/bar.hpp?shead=package', Mkurl.new('/home/foo/bar.hpp', p1).inherit_shead assert_equal '.?shead=package', Mkurl.new('.', p1).inherit_shead assert_equal '/home/foo/bar.hpp', Mkurl.new('/home/foo/bar.hpp', p2).inherit_shead assert_equal '/home/foo/bar.hpp', Mkurl.new('/home/foo/bar.hpp', p3).inherit_shead end end end
Version data entries
27 entries across 27 versions & 1 rubygems