Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Test trie

  • Loading branch information...
commit 7cfadd74b067292b4a08e997c62c887d6b1732aa 1 parent 70bc991
Per Thulin authored
Showing with 3 additions and 4 deletions.
  1. +0 −3  .gitignore
  2. +3 −1 autosuggestablefilelist.js
3  .gitignore
View
@@ -1,3 +0,0 @@
-*.pyc
-build
-index.html
4 autosuggestablefilelist.js
View
@@ -80,7 +80,7 @@ function AutoSuggestableFileList(data) {
var key = '';
var hash = self.trie;
q = q.toLowerCase();
-
+
for (i = 0; i < q.length; i += 1) {
key += q[i];
if (hash.hasOwnProperty(key)) {
@@ -103,6 +103,8 @@ if (typeof window === 'undefined') {
'server.py',
]);
+ assert.equal(x.trie['s']['se']['ser']['serv']['serve']['server']['server.']['server.p']['server.py']['fullFileName'], 'server.py');
+
var suggestions = x.getSuggestions('serv');
assert.equal(suggestions.length, 1);
assert.equal(suggestions[0], 'server.py');
Please sign in to comment.
Something went wrong with that request. Please try again.