mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
33 lines
705 B
JavaScript
33 lines
705 B
JavaScript
|
describe('Basic html theme search', function() {
|
||
|
|
||
|
describe('terms search', function() {
|
||
|
|
||
|
it('should find "C++" when in index', function() {
|
||
|
index = {
|
||
|
docnames:["index"],
|
||
|
filenames:["index.rst"],
|
||
|
terms:{'c++':0},
|
||
|
titles:["<no title>"],
|
||
|
titleterms:{}
|
||
|
}
|
||
|
Search.setIndex(index);
|
||
|
searchterms = ['c++'];
|
||
|
excluded = [];
|
||
|
terms = index.terms;
|
||
|
titleterms = index.titleterms;
|
||
|
|
||
|
hits = [[
|
||
|
"index",
|
||
|
"<no title>",
|
||
|
"",
|
||
|
null,
|
||
|
2,
|
||
|
"index.rst"
|
||
|
]];
|
||
|
expect(Search.performTermsSearch(searchterms, excluded, terms, titleterms)).toEqual(hits);
|
||
|
});
|
||
|
|
||
|
});
|
||
|
|
||
|
});
|