78 |
} |
} |
79 |
|
|
80 |
var word = words[word_nr]; |
var word = words[word_nr]; |
81 |
var part = test_data[word]; |
var len = 0; |
82 |
|
for (var i in test_data[word]) len++; |
83 |
|
|
84 |
if (result.length == part.length) { |
if (result.length == len) { |
85 |
msg_ok("found "+result.lengh+" results"); |
msg_ok("found "+result.lengh+" results"); |
86 |
} else if ( result.length > part.length ) |
} else if ( result.length > len ) |
87 |
msg_error("too much results "+result.length+" > "+part.length) |
msg_error("too much results "+result.length+" > "+len) |
88 |
else msg_error("too fiew results "+result.length+" < "+part.length); |
else msg_error("too fiew results "+result.length+" < "+len); |
89 |
|
|
90 |
for(var i=result.length-1; i>=0; i--) { |
for(var i=result.length-1; i>=0; i--) { |
91 |
var test_hit = i+": <em>"+ |
var test_hit = i+": <em>"+ |
139 |
|
|
140 |
debug("search for "+words[word_nr]+" ["+word_nr+"]"); |
debug("search for "+words[word_nr]+" ["+word_nr+"]"); |
141 |
|
|
142 |
doSearch('ulyss', words[word_nr], got_result); |
doSearch('homer', words[word_nr], got_result); |
143 |
|
|
144 |
|
|
145 |
if (1 || test_failed) { |
if (1 || test_failed) { |