[Tomoe-cvs 2121] CVS update: tomoe/test

アーカイブの一覧に戻る

Kouhei Sutou kous****@users*****
2007年 1月 19日 (金) 12:26:56 JST


Index: tomoe/test/char_spec.rb
diff -u tomoe/test/char_spec.rb:1.9 tomoe/test/char_spec.rb:1.10
--- tomoe/test/char_spec.rb:1.9	Fri Dec 22 14:26:03 2006
+++ tomoe/test/char_spec.rb	Fri Jan 19 12:26:56 2007
@@ -70,6 +70,21 @@
     new_char.radicals.should == [sanzui]
   end
 
+  specify "should load from dumped XML with n_strokes" do
+    utf8 = "a"
+    n_strokes = 5
+
+    char = Tomoe::Char.new
+    char.utf8 = utf8
+    char.n_strokes.should == -1
+    char.n_strokes = n_strokes
+    char.n_strokes.should == n_strokes
+
+    new_char = Tomoe::Char.new(char.to_xml)
+    new_char.utf8.should == utf8
+    new_char.n_strokes.should == n_strokes
+  end
+
   specify "should set/get n_strokes" do
     char = Tomoe::Char.new
     char.n_strokes.should == -1


tomoe-cvs メーリングリストの案内
アーカイブの一覧に戻る