Added one more test case

This commit is contained in:
Alex Ross
2018-09-10 10:25:23 -07:00
parent 54ed988fd1
commit d5c17a0cc9
+9
View File
@@ -68,15 +68,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);
});
it('should respect search regex', function(): void {
search.apply(<any>MockTerminal);