Skip to content

Commit 93937e0

Browse files
committed
use github for coderay-test-scanners
1 parent 3effca8 commit 93937e0

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

rake_tasks/test.rake

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,42 @@
11
namespace :test do
2-
2+
33
desc 'run all sample tests'
44
task :samples do
55
ruby './sample/suite.rb'
66
end
7-
7+
88
desc 'run functional tests'
99
task :functional do
1010
ruby './test/functional/suite.rb'
1111
ruby './test/functional/for_redcloth.rb'
1212
end
13-
13+
1414
desc 'run unit tests'
1515
task :units do
1616
ruby './test/unit/suite.rb'
1717
end
18-
18+
1919
scanner_suite = 'test/scanners/suite.rb'
2020
task scanner_suite do
2121
unless File.exist? scanner_suite
22-
puts 'Scanner tests not found; downloading from Subversion...'
23-
sh 'svn co http://svn.rubychan.de/coderay-scanner-tests/trunk/ test/scanners/'
22+
puts 'Scanner tests not found; downloading from GitHub...'
23+
sh 'git clone https://github.com/rubychan/coderay-scanner-tests.git test/scanners/'
2424
puts 'Finished.'
2525
end
2626
end
27-
27+
2828
desc 'run all scanner tests'
2929
task :scanners => :update_scanner_suite do
3030
ruby scanner_suite
3131
end
32-
33-
desc 'update scanner test suite from SVN'
32+
33+
desc 'update scanner test suite from GitHub'
3434
task :update_scanner_suite => scanner_suite do
35-
sh "svn up #{File.dirname(scanner_suite)}"
35+
Dir.chdir(File.dirname(scanner_suite)) do
36+
sh "git pull"
37+
end
3638
end
37-
39+
3840
namespace :scanner do
3941
Dir['./test/scanners/*'].each do |scanner|
4042
next unless File.directory? scanner
@@ -45,7 +47,7 @@ namespace :test do
4547
end
4648
end
4749
end
48-
50+
4951
desc 'clean test output files'
5052
task :clean do
5153
for file in Dir['test/scanners/**/*.actual.*']
@@ -61,7 +63,7 @@ namespace :test do
6163
rm file
6264
end
6365
end
64-
66+
6567
desc 'test the CodeRay executable'
6668
task :exe do
6769
if RUBY_VERSION >= '1.8.7'
@@ -72,7 +74,7 @@ namespace :test do
7274
puts "Skipping."
7375
end
7476
end
75-
77+
7678
end
7779

7880
task :test => %w(test:functional test:units test:exe)

0 commit comments

Comments
 (0)