forked from ruby/reline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
47 lines (37 loc) · 1.21 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
require 'bundler/gem_tasks'
require 'rake/testtask'
ENCODING_LIST = {
test_shift_jis: Encoding::Shift_JIS,
test_euc_jp: Encoding::EUC_JP,
test_utf_8: Encoding::UTF_8,
test_cp932: Encoding::Windows_31J,
#test_ibm437: Encoding::IBM437
}
ENCODING_LIST.each_pair do |task_name, encoding|
Rake::TestTask.new(task_name) do |t|
t.ruby_opts << %Q{-I. -e "RELINE_TEST_ENCODING=Encoding.find('#{encoding.name}') ; puts %Q{\nTest Encoding: #{encoding.name}}"}
t.libs << 'test'
t.libs << 'lib'
t.loader = :direct
t.pattern = 'test/reline/test_*.rb'
end
end
task test: ENCODING_LIST.keys
ENCODING_LIST.each_pair do |task_name, encoding|
Rake::TestTask.new("ci-#{task_name}") do |t|
t.ruby_opts << %Q{-I. -e "RELINE_TEST_ENCODING=Encoding.find('#{encoding.name}') ; puts %Q{\nTest Encoding: #{encoding.name}}"}
t.libs << 'tool'
t.libs << 'lib'
t.libs << 'tool/lib'
t.loader = :direct
t.pattern = 'test/ext/**/test_*.rb'
end
end
task "ci-test": ENCODING_LIST.keys.map { |task_name| "ci-#{task_name}" }
Rake::TestTask.new(:test_yamatanooroti) do |t|
t.libs << 'test'
t.libs << 'lib'
#t.loader = :direct
t.pattern = 'test/reline/yamatanooroti/test_*.rb'
end
task default: :test