Skip to content

Commit

Permalink
Added one more test case
Browse files Browse the repository at this point in the history
  • Loading branch information
alexr00 committed Sep 7, 2018
1 parent 411258c commit 4d7c590
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/addons/search/search.test.ts
Expand Up @@ -55,15 +55,24 @@ describe('search addon', function(): void {
term.core.write('texttextHellotext\r\n');
term.core.write('texttexttextHellotext');
term.pushWriteData();
/*
texttextHe
llotext
texttextte
xtHellotex
t
*/

const hello0 = (term.searchHelper as any)._findInLine('Hello', 0);
const hello1 = (term.searchHelper as any)._findInLine('Hello', 1);
const hello2 = (term.searchHelper as any)._findInLine('Hello', 2);
const hello3 = (term.searchHelper as any)._findInLine('Hello', 3);
const llo = (term.searchHelper as any)._findInLine('llo', 1);
expect(hello0).eql({col: 8, row: 0, term: 'Hello'});
expect(hello1).eql(undefined);
expect(hello2).eql({col: 2, row: 3, term: 'Hello'});
expect(hello3).eql(undefined);
expect(llo).eql(undefined);
});
});
});

0 comments on commit 4d7c590

Please sign in to comment.