Skip to content

Commit b78c466

Browse files
author
Priya Rani
committed
OTWO-4616 Add test case for fetching svn tags with whitespaces
1 parent 81f6be7 commit b78c466

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/unit/svn_misc_test.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,21 @@ def test_tags
118118
end
119119
end
120120

121+
def test_tags_with_whitespaces
122+
with_svn_repository('svn', 'trunk') do |source_scm|
123+
OhlohScm::ScratchDir.new do |svn_working_folder|
124+
folder_name = source_scm.root.slice(/[^\/]+\/?\Z/)
125+
system "cd #{ svn_working_folder } && svn co #{ source_scm.root } && cd #{ folder_name } &&
126+
mkdir -p #{ source_scm.root.gsub(/^file:../, '') }/db/transactions
127+
svn copy trunk tags/'first tag' && svn commit -m 'v2.0' && svn update"
128+
129+
assert_equal(['first tag', '6'], source_scm.tags.first[0..1])
130+
# Avoid millisecond comparision.
131+
assert_equal(Time.now.strftime('%F %R'), source_scm.tags.first[-1].strftime('%F %R'))
132+
end
133+
end
134+
end
135+
121136
def test_tags_with_non_tagged_repository
122137
with_svn_repository('svn') do |svn|
123138
assert_equal svn.tags, []

0 commit comments

Comments
 (0)