@@ -96,6 +96,31 class RepositoryMercurialTest < ActiveSupport::TestCase | |||
|
96 | 96 | changesets = @repository.latest_changesets('/sql_escape/underscore_dir/understrike_file.txt', nil) |
|
97 | 97 | assert_equal %w|12 9|, changesets.collect(&:revision) |
|
98 | 98 | end |
|
99 | ||
|
100 | def test_copied_files | |
|
101 | @repository.fetch_changesets | |
|
102 | @repository.reload | |
|
103 | ||
|
104 | cs1 = @repository.changesets.find_by_revision('13') | |
|
105 | c1 = cs1.changes | |
|
106 | assert_equal 2, c1.size | |
|
107 | ||
|
108 | assert_equal 'A', c1[0].action | |
|
109 | assert_equal '/sql_escape/percent%dir/percentfile1.txt', c1[0].path | |
|
110 | assert_equal '/sql_escape/percent%dir/percent%file1.txt', c1[0].from_path | |
|
111 | ||
|
112 | assert_equal 'A', c1[1].action | |
|
113 | assert_equal '/sql_escape/underscore_dir/understrike-file.txt', c1[1].path | |
|
114 | assert_equal '/sql_escape/underscore_dir/understrike_file.txt', c1[1].from_path | |
|
115 | ||
|
116 | cs2 = @repository.changesets.find_by_revision('15') | |
|
117 | c2 = cs2.changes | |
|
118 | assert_equal 1, c2.size | |
|
119 | ||
|
120 | assert_equal 'A', c2[0].action | |
|
121 | assert_equal '/README (1)[2]&,%.-3_4', c2[0].path | |
|
122 | assert_equal '/README', c2[0].from_path | |
|
123 | end | |
|
99 | 124 | else |
|
100 | 125 | puts "Mercurial test repository NOT FOUND. Skipping unit tests !!!" |
|
101 | 126 | def test_fake; assert true end |
General Comments 0
You need to be logged in to leave comments.
Login now