Revision: 1134 http://trac.macosforge.org/projects/ruby/changeset/1134 Author: eloy.de.enige@gmail.com Date: 2009-03-24 06:56:31 -0700 (Tue, 24 Mar 2009) Log Message: ----------- Added failing tests about encoding. Modified Paths: -------------- MacRuby/branches/experimental/Rakefile MacRuby/branches/experimental/test_roxor.rb Modified: MacRuby/branches/experimental/Rakefile =================================================================== --- MacRuby/branches/experimental/Rakefile 2009-03-24 13:46:41 UTC (rev 1133) +++ MacRuby/branches/experimental/Rakefile 2009-03-24 13:56:31 UTC (rev 1134) @@ -1,3 +1,5 @@ +# encoding: utf-8 + # See ./rakelib/*.rake for all tasks. desc "Same as all" Modified: MacRuby/branches/experimental/test_roxor.rb =================================================================== --- MacRuby/branches/experimental/test_roxor.rb 2009-03-24 13:46:41 UTC (rev 1133) +++ MacRuby/branches/experimental/test_roxor.rb 2009-03-24 13:56:31 UTC (rev 1134) @@ -1393,4 +1393,13 @@ assert "true", "p(Dir['*.c'].length > 1)" assert "true", "p(Dir.glob('*.c').length > 1)" + end + +test "encoding" do + + assert "US-ASCII", "File.open('Rakefile', 'r:US-ASCII') {|f| puts f.read.encoding.name }" + + assert ":ok", "puts ':ok'.encode('US-ASCII')" + +end \ No newline at end of file
participants (1)
-
source_changes@macosforge.org