Permalink
Browse files

+ Failing specs for unicode parsing

  • Loading branch information...
1 parent 98f437c commit 08c0d7801d199a6a5ccefda7b59b0275621d5cee @kschiess committed May 29, 2011
Showing with 13 additions and 0 deletions.
  1. +13 −0 spec/acceptance/regression_spec.rb
@@ -1,3 +1,5 @@
+# Encoding: UTF-8
+
require File.dirname(__FILE__) + '/../spec_helper'
require 'parslet'
@@ -167,4 +169,15 @@ class BLanguage < Parslet::Parser
transform.apply(subject.parse('bb')).should == :ok
end
end
+
+ class UnicodeLanguage < Parslet::Parser
+ root :gobble
+ rule(:gobble) { any.repeat }
+ end
+ describe UnicodeLanguage do
+ it "should parse UTF-8 strings" do
+ subject.should parse('éèäöü').as('éèäöü')
+ subject.should parse('RubyKaigi2009のテーマは、「変わる/変える」です。 前回の').as('RubyKaigi2009のテーマは、「変わる/変える」です。 前回の')
+ end
+ end
end

0 comments on commit 08c0d78

Please sign in to comment.