[前][次][番号順一覧][スレッド一覧]

ruby-changes:25837

From: drbrain <ko1@a...>
Date: Tue, 27 Nov 2012 16:09:33 +0900 (JST)
Subject: [ruby-changes:25837] drbrain:r37894 (trunk): * test/rdoc/test_rdoc_generator_darkfish.rb: Updated tests for windows

drbrain	2012-11-27 16:09:21 +0900 (Tue, 27 Nov 2012)

  New Revision: 37894

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37894

  Log:
    * 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

  Modified files:
    trunk/ChangeLog
    trunk/test/rdoc/test_rdoc_generator_darkfish.rb
    trunk/test/rdoc/test_rdoc_options.rb
    trunk/test/rdoc/test_rdoc_parser.rb
    trunk/test/rdoc/test_rdoc_rdoc.rb
    trunk/test/rdoc/test_rdoc_ri_driver.rb
    trunk/test/rdoc/test_rdoc_servlet.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37893)
+++ ChangeLog	(revision 37894)
@@ -1,3 +1,12 @@
+Tue Nov 27 16:06:00 2012  Eric Hodel  <drbrain@s...>
+
+	* 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
+
 Tue Nov 27 15:13:51 2012  Eric Hodel  <drbrain@s...>
 
 	* common.mk (rdoc):  Set --debug for rdoc generation in case of bugs
Index: test/rdoc/test_rdoc_rdoc.rb
===================================================================
--- test/rdoc/test_rdoc_rdoc.rb	(revision 37893)
+++ test/rdoc/test_rdoc_rdoc.rb	(revision 37894)
@@ -157,6 +157,8 @@
   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 @@
 
   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
 
Index: test/rdoc/test_rdoc_servlet.rb
===================================================================
--- test/rdoc/test_rdoc_servlet.rb	(revision 37893)
+++ test/rdoc/test_rdoc_servlet.rb	(revision 37894)
@@ -248,6 +248,8 @@
   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 @@
   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, '.'
Index: test/rdoc/test_rdoc_ri_driver.rb
===================================================================
--- test/rdoc/test_rdoc_ri_driver.rb	(revision 37893)
+++ test/rdoc/test_rdoc_ri_driver.rb	(revision 37894)
@@ -1055,7 +1055,9 @@
     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
 
Index: test/rdoc/test_rdoc_options.rb
===================================================================
--- test/rdoc/test_rdoc_options.rb	(revision 37893)
+++ test/rdoc/test_rdoc_options.rb	(revision 37894)
@@ -195,7 +195,9 @@
   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
Index: test/rdoc/test_rdoc_parser.rb
===================================================================
--- test/rdoc/test_rdoc_parser.rb	(revision 37893)
+++ test/rdoc/test_rdoc_parser.rb	(revision 37894)
@@ -62,6 +62,8 @@
   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
Index: test/rdoc/test_rdoc_generator_darkfish.rb
===================================================================
--- test/rdoc/test_rdoc_generator_darkfish.rb	(revision 37893)
+++ test/rdoc/test_rdoc_generator_darkfish.rb	(revision 37894)
@@ -92,7 +92,7 @@
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]