/[jsFind]/trunk/html/test.html
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/html/test.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 20 by dpavlin, Mon Oct 4 19:51:05 2004 UTC revision 21 by dpavlin, Wed Oct 6 15:33:33 2004 UTC
# Line 78  function got_result(result) { Line 78  function got_result(result) {
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>"+
# Line 138  function do_search() { Line 139  function do_search() {
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) {

Legend:
Removed from v.20  
changed lines
  Added in v.21

  ViewVC Help
Powered by ViewVC 1.1.26