<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>bin/database_generator.rb</filename>
    </added>
    <added>
      <filename>lib/multibyte/handlers/unicode_tables.dat</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -2,6 +2,9 @@
 require 'open-uri'
 require 'tmpdir'
 
+$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../../../lib'))
+require 'multibyte'
+
 module Multibyte::Handlers #:nodoc:
   class UnicodeDatabase #:nodoc:
     def self.load</diff>
      <filename>lib/multibyte/generators/generate_tables.rb</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@ module Multibyte::Handlers #:nodoc:
     
     # Returns the directory in which the data files are stored
     def self.dirname
-      File.dirname(__FILE__) + '/../../values/'
+      File.dirname(__FILE__) + '/'
     end
     
     # Returns the filename for the data file for this version</diff>
      <filename>lib/multibyte/handlers/utf8_handler.rb</filename>
    </modified>
    <modified>
      <diff>@@ -110,4 +110,99 @@ describe &quot;Chars&quot; do
     
   end
   
+  describe 'regexp matching' do
+    
+    it &quot;should should use String when kcode not set&quot; do
+      with_kcode('none') do
+        (string_format_examples[:utf8].chars =~ /&#64259;/).should == 12
+      end
+    end
+    
+    it &quot;should be unicode aware&quot; do
+      with_kcode('UTF8') do
+        (string_format_examples[:utf8].chars =~ /&#64259;/).should == 9
+      end
+    end
+    
+    it &quot;should return nil if no matches were found&quot; do
+      with_kcode('UTF8') do
+        (''.chars =~ /\d+/).should be_nil
+      end
+    end
+    
+  end
+  
+  describe 'UTF8 pragma' do
+    
+    it &quot;should be on because KCODE is UTF8&quot; do
+      if RUBY_VERSION &lt; '1.9'
+        with_kcode('UTF8') do
+          &quot; &quot;.chars.send(:utf8_pragma?).should be_true
+        end
+      end
+    end
+    
+    it &quot;should be off because KCODE is UTF8&quot; do
+      if RUBY_VERSION &lt; '1.9'
+        with_kcode('none') do
+          &quot; &quot;.chars.send(:utf8_pragma?).should be_false
+        end
+      end
+    end
+    
+    it &quot;should be OFF on Ruby 1.9&quot; do
+      if RUBY_VERSION &gt; '1.9'
+        &quot; &quot;.chars.send(:utf8_pragma?).shoud be_false
+      end
+    end
+    
+  end
+  
+  describe 'handler settings' do
+    
+    before(:each) do
+      @handler = ''.chars.handler
+    end
+    
+    after(:all) do
+      Multibyte::Chars.handler = Multibyte::Handlers::UTF8Handler
+    end
+    
+    it &quot;should process use and set handlers in the proper order&quot; do
+      Multibyte::Chars.handler = :first
+      ''.chars.handler.should == :first
+      
+      Multibyte::Chars.handler = :second
+      ''.chars.handler.should == :second
+      
+      Multibyte::Chars.handler = @handler
+    end
+    
+    it &quot;should raise an error&quot; do
+      lambda{''.chars.handler.split}.should raise_error
+    end
+
+  end
+  
+  describe 'method chaining' do
+    
+    it &quot;should return a chars instance when using downcase&quot; do
+      ''.chars.downcase.should be_an_instance_of(Multibyte::Chars)
+    end
+    
+    it &quot;should return a chars instance when using downcase&quot; do
+      ''.chars.strip.should be_an_instance_of(Multibyte::Chars)
+    end
+    
+    it &quot;should forward the chars instance down the down call path of chaining&quot; do
+      stripped = ''.chars.downcase.strip
+      stripped.should be_an_instance_of(Multibyte::Chars)
+    end
+    
+    it &quot;should output a comparable result than a string result&quot; do
+      &quot;  FOO   &quot;.chars.normalize.downcase.strip.should == 'foo'
+    end
+    
+  end
+  
 end
\ No newline at end of file</diff>
      <filename>spec/multibyte_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>aba323401191c365c608563d7a048effe4cc8b52</id>
    </parent>
  </parents>
  <author>
    <name>Matt Aimonetti</name>
    <email>mattaimonetti@gmail.com</email>
  </author>
  <url>http://github.com/mattetti/multibyte/commit/adc262ebaa523a73997fb6d0dcc307b8e8f28846</url>
  <id>adc262ebaa523a73997fb6d0dcc307b8e8f28846</id>
  <committed-date>2008-06-03T22:14:15-07:00</committed-date>
  <authored-date>2008-06-03T22:14:15-07:00</authored-date>
  <message>new binary table</message>
  <tree>29356a8c40cfaad008b0d499ffac2c44b2282162</tree>
  <committer>
    <name>Matt Aimonetti</name>
    <email>mattaimonetti@gmail.com</email>
  </committer>
</commit>
