Merge pull request #3347 from Microsoft/irregularExpressionCompletion

Block completion when in the flags of a regular expression
This commit is contained in:
Daniel Rosenwasser
2015-06-02 14:15:47 -07:00
7 changed files with 59 additions and 6 deletions

View File

@@ -0,0 +1,8 @@
/// <reference path="fourslash.ts" />
////let v = 100;
/////a/./**/
goTo.marker();
verify.not.memberListContains('v');
verify.memberListContains('compile');

View File

@@ -0,0 +1,10 @@
/// <reference path="fourslash.ts" />
////let v = 100;
////let x = /absidey//**/
// Should get nothing at the marker since it's
// going to be considered part of the regex flags.
goTo.marker();
verify.completionListIsEmpty();

View File

@@ -0,0 +1,11 @@
/// <reference path="fourslash.ts" />
////let v = 100;
////let x = /absidey/
/////**/
// Should not be blocked since there is a
// newline separating us from the regex flags.
goTo.marker();
verify.completionListContains("v");

View File

@@ -0,0 +1,10 @@
/// <reference path="fourslash.ts" />
////let v = 100;
////let x = /absidey/ /**/
// Should not be blocked since there is a
// space separating us from the regex flags.
goTo.marker();
verify.completionListContains("v");

View File

@@ -0,0 +1,10 @@
/// <reference path="fourslash.ts" />
////let v = 100;
////let x = /absidey/g/**/
// Should get nothing at the marker since it's
// going to be considered part of the regex flags.
goTo.marker();
verify.completionListIsEmpty()

View File

@@ -3,5 +3,5 @@
/////a/./**/
goTo.marker();
//verify.not.memberListContains('alert');
//verify.memberListContains('compile');
verify.not.memberListContains('alert');
verify.memberListContains('compile');