[macruby-changes] [3232] MacRuby/trunk/spec/frozen

source_changes at macosforge.org source_changes at macosforge.org
Sun Jan 10 12:53:42 PST 2010


Revision: 3232
          http://trac.macosforge.org/projects/ruby/changeset/3232
Author:   eloy.de.enige at gmail.com
Date:     2010-01-10 12:53:41 -0800 (Sun, 10 Jan 2010)
Log Message:
-----------
Tagged critical examples and disabled a few that don't compile.

Modified Paths:
--------------
    MacRuby/trunk/spec/frozen/language/if_spec.rb
    MacRuby/trunk/spec/frozen/tags/macruby/core/bignum/modulo_tags.txt
    MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/String_tags.txt
    MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/method_tags.txt
    MacRuby/trunk/spec/frozen/tags/macruby/library/conditionvariable/signal_tags.txt
    MacRuby/trunk/spec/frozen/tags/macruby/library/socket/basicsocket/recv_tags.txt

Added Paths:
-----------
    MacRuby/trunk/spec/frozen/library/readline/readline_spec_disabled.rb
    MacRuby/trunk/spec/frozen/tags/macruby/language/defined_tags.txt
    MacRuby/trunk/spec/frozen/tags/macruby/library/uri/equality_tags.txt

Removed Paths:
-------------
    MacRuby/trunk/spec/frozen/library/readline/readline_spec.rb

Modified: MacRuby/trunk/spec/frozen/language/if_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/language/if_spec.rb	2010-01-10 20:53:19 UTC (rev 3231)
+++ MacRuby/trunk/spec/frozen/language/if_spec.rb	2010-01-10 20:53:41 UTC (rev 3232)
@@ -213,35 +213,37 @@
     if false then 123; else 456; end.should == 456
   end
 
-  describe "with a boolean range ('flip-flop' operator)" do
-    before :each do
-      ScratchPad.record []
-    end
-
-    after :each do
-      ScratchPad.clear
-    end
-
-    it "mimics an awk conditional with a single-element inclusive-end range" do
-      10.times { |i| ScratchPad << i if (i == 4)..(i == 4) }
-      ScratchPad.recorded.should == [4]
-    end
-
-    it "mimics an awk conditional with a many-element inclusive-end range" do
-      10.times { |i| ScratchPad << i if (i == 4)..(i == 7) }
-      ScratchPad.recorded.should == [4, 5, 6, 7]
-    end
-
-    it "mimics a sed conditional with a zero-element exclusive-end range" do
-      10.times { |i| ScratchPad << i if (i == 4)...(i == 4) }
-      ScratchPad.recorded.should == [4, 5, 6, 7, 8, 9]
-    end
-
-    it "mimics a sed conditional with a many-element exclusive-end range" do
-      10.times { |i| ScratchPad << i if (i == 4)...(i == 5) }
-      ScratchPad.recorded.should == [4, 5]
-    end
-  end
+  # MacRuby TODO: causes a compile error
+  #
+  # describe "with a boolean range ('flip-flop' operator)" do
+  #   before :each do
+  #     ScratchPad.record []
+  #   end
+  # 
+  #   after :each do
+  #     ScratchPad.clear
+  #   end
+  # 
+  #   it "mimics an awk conditional with a single-element inclusive-end range" do
+  #     10.times { |i| ScratchPad << i if (i == 4)..(i == 4) }
+  #     ScratchPad.recorded.should == [4]
+  #   end
+  # 
+  #   it "mimics an awk conditional with a many-element inclusive-end range" do
+  #     10.times { |i| ScratchPad << i if (i == 4)..(i == 7) }
+  #     ScratchPad.recorded.should == [4, 5, 6, 7]
+  #   end
+  # 
+  #   it "mimics a sed conditional with a zero-element exclusive-end range" do
+  #     10.times { |i| ScratchPad << i if (i == 4)...(i == 4) }
+  #     ScratchPad.recorded.should == [4, 5, 6, 7, 8, 9]
+  #   end
+  # 
+  #   it "mimics a sed conditional with a many-element exclusive-end range" do
+  #     10.times { |i| ScratchPad << i if (i == 4)...(i == 5) }
+  #     ScratchPad.recorded.should == [4, 5]
+  #   end
+  # end
 end
 
 describe "The postfix if form" do

Deleted: MacRuby/trunk/spec/frozen/library/readline/readline_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/library/readline/readline_spec.rb	2010-01-10 20:53:19 UTC (rev 3231)
+++ MacRuby/trunk/spec/frozen/library/readline/readline_spec.rb	2010-01-10 20:53:41 UTC (rev 3232)
@@ -1,35 +0,0 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-
-process_is_foreground do
-
-  not_supported_on :ironruby, :jruby do
-    require 'readline'
-
-    describe "Readline.readline" do
-      before :each do
-        @file = tmp('readline')
-        File.open(@file, 'w') do |file|
-          file.puts "test\n"
-        end
-        @stdin_back = STDIN.dup
-        @stdout_back = STDOUT.dup
-        STDIN.reopen(@file, 'r')
-        STDOUT.reopen("/dev/null")
-      end
-
-      after :each do
-        rm_r @file
-        STDIN.reopen(@stdin_back)
-        STDOUT.reopen(@stdout_back)
-      end
-
-      it "returns the input string" do
-        Readline.readline.should == "test"
-      end
-
-      it "taints the returned strings" do
-        Readline.readline.tainted?.should be_true
-      end
-    end
-  end
-end

Copied: MacRuby/trunk/spec/frozen/library/readline/readline_spec_disabled.rb (from rev 3231, MacRuby/trunk/spec/frozen/library/readline/readline_spec.rb)
===================================================================
--- MacRuby/trunk/spec/frozen/library/readline/readline_spec_disabled.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/library/readline/readline_spec_disabled.rb	2010-01-10 20:53:41 UTC (rev 3232)
@@ -0,0 +1,35 @@
+require File.dirname(__FILE__) + '/../../spec_helper'
+
+process_is_foreground do
+
+  not_supported_on :ironruby, :jruby do
+    require 'readline'
+
+    describe "Readline.readline" do
+      before :each do
+        @file = tmp('readline')
+        File.open(@file, 'w') do |file|
+          file.puts "test\n"
+        end
+        @stdin_back = STDIN.dup
+        @stdout_back = STDOUT.dup
+        STDIN.reopen(@file, 'r')
+        STDOUT.reopen("/dev/null")
+      end
+
+      after :each do
+        rm_r @file
+        STDIN.reopen(@stdin_back)
+        STDOUT.reopen(@stdout_back)
+      end
+
+      it "returns the input string" do
+        Readline.readline.should == "test"
+      end
+
+      it "taints the returned strings" do
+        Readline.readline.tainted?.should be_true
+      end
+    end
+  end
+end

Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/bignum/modulo_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/bignum/modulo_tags.txt	2010-01-10 20:53:19 UTC (rev 3231)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/bignum/modulo_tags.txt	2010-01-10 20:53:41 UTC (rev 3232)
@@ -1,4 +1,5 @@
 critical:Bignum#modulo returns the modulus obtained from dividing self by the given argument
 critical:Bignum#modulo raises a ZeroDivisionError when the given argument is 0
+critical:Bignum#modulo raises a ZeroDivisionError when the given argument is 0 and a Float
 critical:Bignum#modulo raises a TypeError when given a non-Integer
 fails:Bignum#% returns the modulus obtained from dividing self by the given argument
\ No newline at end of file

Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/String_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/String_tags.txt	2010-01-10 20:53:19 UTC (rev 3231)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/String_tags.txt	2010-01-10 20:53:41 UTC (rev 3232)
@@ -5,6 +5,6 @@
 fails:Kernel#String raises a TypeError if #to_s is not provided
 fails:Kernel#String tries to call the to_s method if respond_to? returns true for to_s
 fails:Kernel.String converts a constant to a String
-critical:Kernel.String raises a NoMethodError if #to_s is not defined but #respond_to?(:to_s) returns true
+critical:Kernel.String raises a TypeError if #to_s is not defined, even though #respond_to?(:to_s) returns true
 fails:Kernel#String converts a constant to a String
-critical:Kernel#String raises a NoMethodError if #to_s is not defined but #respond_to?(:to_s) returns true
+critical:Kernel#String raises a TypeError if #to_s is not defined, even though #respond_to?(:to_s) returns true
\ No newline at end of file

Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/method_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/method_tags.txt	2010-01-10 20:53:19 UTC (rev 3231)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/method_tags.txt	2010-01-10 20:53:41 UTC (rev 3232)
@@ -1,3 +1,4 @@
 critical:Kernel#method returns a method object for a valid method
 critical:Kernel#method returns a method object for a valid singleton method
+critical:Kernel#method can call methods created with define_method
 critical:Kernel#method changes the method called for super on a target aliased method
\ No newline at end of file

Added: MacRuby/trunk/spec/frozen/tags/macruby/language/defined_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/language/defined_tags.txt	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/tags/macruby/language/defined_tags.txt	2010-01-10 20:53:41 UTC (rev 3232)
@@ -0,0 +1,4 @@
+critical:The defined? keyword returns 'super' when Subclass#no_args and created with define_method
+critical:The defined? keyword returns 'super' when Subclass#args and created with define_method
+critical:The defined? keyword returns 'super' when Subclass#no_args uses a block in define_method
+critical:The defined? keyword returns 'super' when Subclass#args uses a block in define_method

Modified: MacRuby/trunk/spec/frozen/tags/macruby/library/conditionvariable/signal_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/library/conditionvariable/signal_tags.txt	2010-01-10 20:53:19 UTC (rev 3231)
+++ MacRuby/trunk/spec/frozen/tags/macruby/library/conditionvariable/signal_tags.txt	2010-01-10 20:53:41 UTC (rev 3232)
@@ -1,2 +1,3 @@
+critical:ConditionVariable#signal releases the first thread waiting in line for this resource
 fails:ConditionVariable#signal should return self if nothing to signal
 fails:ConditionVariable#signal should return self if something is waiting for a signal

Modified: MacRuby/trunk/spec/frozen/tags/macruby/library/socket/basicsocket/recv_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/library/socket/basicsocket/recv_tags.txt	2010-01-10 20:53:19 UTC (rev 3231)
+++ MacRuby/trunk/spec/frozen/tags/macruby/library/socket/basicsocket/recv_tags.txt	2010-01-10 20:53:41 UTC (rev 3232)
@@ -1,2 +1,3 @@
 critical:BasicSocket#recv receives a specified number of bytes of a message from another socket
-critical:BasicSocket#recv accepts flags to specify unusual receiving behaviour
\ No newline at end of file
+critical:BasicSocket#recv accepts flags to specify unusual receiving behaviour
+critical:BasicSocket#recv gets lines delimited with a custom separator

Added: MacRuby/trunk/spec/frozen/tags/macruby/library/uri/equality_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/library/uri/equality_tags.txt	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/tags/macruby/library/uri/equality_tags.txt	2010-01-10 20:53:41 UTC (rev 3232)
@@ -0,0 +1 @@
+critical:URI#== ignores capitalization of scheme
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100110/628c5c00/attachment-0001.html>


More information about the macruby-changes mailing list