test/rim_info_test.rb in esr-rim-1.2.2 vs test/rim_info_test.rb in esr-rim-1.3.0

- old
+ new

@@ -73,19 +73,44 @@ def test_attributes attrs = { :remote_url => "ssh://somehost/dir1/dir2", :revision_sha1 => "8347982374198379842984562095637243593092", :target_revision => "trunk", - :ignores => "CMakeLists.txt,*.arxml" + :ignores => "CMakeLists.txt,*.arxml", + :subdir => "foo/bar" } d = empty_test_dir("rim_info") create_rim_info(d, attrs) ri = RIM::RimInfo.from_dir(d) #puts File.read(d+"/.riminfo") attrs.each_pair do |k,v| assert_equal v, ri.send(k) end end + +def test_subdir_default + attrs_write = { + :remote_url => "ssh://somehost/dir1/dir2", + :revision_sha1 => "8347982374198379842984562095637243593092", + :target_revision => "trunk", + :ignores => "CMakeLists.txt,*.arxml", + } + attrs_expected = { + :remote_url => "ssh://somehost/dir1/dir2", + :revision_sha1 => "8347982374198379842984562095637243593092", + :target_revision => "trunk", + :ignores => "CMakeLists.txt,*.arxml", + :subdir => nil + } + d = empty_test_dir("rim_info") + create_rim_info(d, attrs_write) + ri = RIM::RimInfo.from_dir(d) + #puts File.read(d+"/.riminfo") + attrs_expected.each_pair do |k,v| + assert_equal v, ri.send(k) + end +end + def teardown # clean up test dirs created during last test remove_test_dirs end