fantasdic r348 - in trunk: . lib/fantasdic/sources test
- From: mblondel svn gnome org
- To: svn-commits-list gnome org
- Subject: fantasdic r348 - in trunk: . lib/fantasdic/sources test
- Date: Sat, 30 Aug 2008 10:00:46 +0000 (UTC)
Author: mblondel
Date: Sat Aug 30 10:00:46 2008
New Revision: 348
URL: http://svn.gnome.org/viewvc/fantasdic?rev=348&view=rev
Log:
* lib/fantasdic/sources/dictd_file.rb: Make get_word_list return the
(word, offset, len) triplet rather than just the word.
* test/test_dictd_file.rb: Updated.
Modified:
trunk/ChangeLog
trunk/lib/fantasdic/sources/dictd_file.rb
trunk/test/test_dictd_file.rb
Modified: trunk/lib/fantasdic/sources/dictd_file.rb
==============================================================================
--- trunk/lib/fantasdic/sources/dictd_file.rb (original)
+++ trunk/lib/fantasdic/sources/dictd_file.rb Sat Aug 30 10:00:46 2008
@@ -148,7 +148,7 @@
def get_word_list
self.rewind
- self.lines.map { |l| l.split("\t").first }
+ self.lines.map { |line| DictdIndex.get_fields(line) }
end
end
Modified: trunk/test/test_dictd_file.rb
==============================================================================
--- trunk/test/test_dictd_file.rb (original)
+++ trunk/test/test_dictd_file.rb Sat Aug 30 10:00:46 2008
@@ -118,7 +118,7 @@
def test_get_word_list
DictdIndex.open($index_file) do |index|
- assert_equal(index.get_word_list[0..24],
+ assert_equal(index.get_word_list[0..24].map { |a| a.first },
["00databasealphabet",
"00databasedictfmt11010",
"00databaseinfo",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]