summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-27 07:09:21 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-27 07:09:21 +0000
commitef8e0908af4a1784d8e06b0110168e2df0f95f1e (patch)
tree8cc04051f27ecefd91408b29016b95605a33c94e /test
parent585de40a6955434c93910295f452308c5f9d548f (diff)
* test/rdoc/test_rdoc_generator_darkfish.rb: Updated tests for windows
* test/rdoc/test_rdoc_options.rb: ditto * test/rdoc/test_rdoc_parser.rb: ditto * test/rdoc/test_rdoc_rdoc.rb: ditto * test/rdoc/test_rdoc_ri_driver.rb: ditto * test/rdoc/test_rdoc_servlet.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/rdoc/test_rdoc_generator_darkfish.rb2
-rw-r--r--test/rdoc/test_rdoc_options.rb4
-rw-r--r--test/rdoc/test_rdoc_parser.rb2
-rw-r--r--test/rdoc/test_rdoc_rdoc.rb4
-rw-r--r--test/rdoc/test_rdoc_ri_driver.rb4
-rw-r--r--test/rdoc/test_rdoc_servlet.rb4
6 files changed, 16 insertions, 4 deletions
diff --git a/test/rdoc/test_rdoc_generator_darkfish.rb b/test/rdoc/test_rdoc_generator_darkfish.rb
index d1c2f66665..08c14f8d57 100644
--- a/test/rdoc/test_rdoc_generator_darkfish.rb
+++ b/test/rdoc/test_rdoc_generator_darkfish.rb
@@ -92,7 +92,7 @@ class TestRDocGeneratorDarkfish < RDoc::TestCase
assert_file 'js/search_index.js'
encoding = if Object.const_defined? :Encoding then
- Regexp.escape Encoding.default_external.name
+ Regexp.escape Encoding::UTF_8.name
else
Regexp.escape 'UTF-8'
end
diff --git a/test/rdoc/test_rdoc_options.rb b/test/rdoc/test_rdoc_options.rb
index ddd9cb83ae..be95580ee4 100644
--- a/test/rdoc/test_rdoc_options.rb
+++ b/test/rdoc/test_rdoc_options.rb
@@ -195,7 +195,9 @@ rdoc_include:
def test_parse_copy_files_directory_absolute
@options.parse %w[--copy-files /]
- assert_equal ['/'], @options.static_path
+ assert_equal 1, @options.static_path.length
+
+ assert_match %r%^([A-Z]:)?/$%, @options.static_path.first
end
def test_parse_coverage
diff --git a/test/rdoc/test_rdoc_parser.rb b/test/rdoc/test_rdoc_parser.rb
index 35a797063a..581e811a5f 100644
--- a/test/rdoc/test_rdoc_parser.rb
+++ b/test/rdoc/test_rdoc_parser.rb
@@ -62,6 +62,8 @@ class TestRDocParser < RDoc::TestCase
end
def test_class_can_parse_forbidden
+ skip 'chmod not supported' if Gem.win_platform?
+
Tempfile.open 'forbidden' do |io|
begin
File.chmod 0000, io.path
diff --git a/test/rdoc/test_rdoc_rdoc.rb b/test/rdoc/test_rdoc_rdoc.rb
index fd6b3f81e4..b0a0fadc49 100644
--- a/test/rdoc/test_rdoc_rdoc.rb
+++ b/test/rdoc/test_rdoc_rdoc.rb
@@ -157,6 +157,8 @@ class TestRDocRDoc < RDoc::TestCase
end
def test_parse_file_forbidden
+ skip 'chmod not supported' if Gem.win_platform?
+
@rdoc.store = RDoc::Store.new
Tempfile.open 'test.txt' do |io|
@@ -196,7 +198,7 @@ class TestRDocRDoc < RDoc::TestCase
def test_remove_unparseable_tags_emacs
temp_dir do
- open 'TAGS', 'w' do |io| # emacs
+ open 'TAGS', 'wb' do |io| # emacs
io.write "\f\nlib/foo.rb,43\n"
end
diff --git a/test/rdoc/test_rdoc_ri_driver.rb b/test/rdoc/test_rdoc_ri_driver.rb
index 8fb91c5e1c..3f0e667784 100644
--- a/test/rdoc/test_rdoc_ri_driver.rb
+++ b/test/rdoc/test_rdoc_ri_driver.rb
@@ -1055,7 +1055,9 @@ Foo::Bar#bother
refute @driver.paging?
end
- def test_page_in_presence_of_child_status
+ # this test is too fragile. Perhaps using Process.spawn will make this
+ # reliable
+ def _test_page_in_presence_of_child_status
skip 'this test hangs on travis-ci.org' if ENV['CI']
@driver.use_stdout = false
diff --git a/test/rdoc/test_rdoc_servlet.rb b/test/rdoc/test_rdoc_servlet.rb
index 0234d33077..e349babeb0 100644
--- a/test/rdoc/test_rdoc_servlet.rb
+++ b/test/rdoc/test_rdoc_servlet.rb
@@ -248,6 +248,8 @@ class TestRDocServlet < RDoc::TestCase
end
def test_if_modified_since
+ skip 'File.utime on directory not supported' if Gem.win_platform?
+
temp_dir do
now = Time.now
File.utime now, now, '.'
@@ -259,6 +261,8 @@ class TestRDocServlet < RDoc::TestCase
end
def test_if_modified_since_not_modified
+ skip 'File.utime on directory not supported' if Gem.win_platform?
+
temp_dir do
now = Time.now
File.utime now, now, '.'