@@ -114,6 +114,49 @@ define(function (require, exports, module) {
114114 return codeHintList ;
115115 }
116116
117+ // TODO: There seems to be an issue with CodeHintManager._removeHintProvider because of which the tests
118+ // added for "Hint Provider Registration" are interfering with this test case
119+ // (mock provider added for new language shows up for RegExp, even though no code hint should show up)
120+ // I am unable to reproduce this in a real scenario though/
121+ // This is the reason this test case is being added before the registration test cases.
122+ // We need to either figure out whats going wrong with register or change the RegExp code hint fix to bail
123+ // before HintUtils (Something like the fix for no code hints for multiple selection)
124+ describe ( "RegExp codehint tests" , function ( ) {
125+ it ( "should not show codehints for regular expression in a script block in html" , function ( ) {
126+ var editor ,
127+ pos = { line : 8 , ch : 30 } ;
128+
129+ // Place cursor inside a sample regular expression
130+ // Note: line for pos is 0-based and editor lines numbers are 1-based
131+ initCodeHintTest ( "test1.html" , pos ) ;
132+
133+ runs ( function ( ) {
134+ editor = EditorManager . getCurrentFullEditor ( ) ;
135+ expect ( editor ) . toBeTruthy ( ) ;
136+ invokeCodeHints ( ) ;
137+ expectNoHints ( ) ;
138+ editor = null ;
139+ } ) ;
140+ } ) ;
141+
142+ it ( "should not show codehints for regular expression in a Javascript file" , function ( ) {
143+ var editor ,
144+ pos = { line : 2 , ch : 30 } ;
145+
146+ // Place cursor inside a sample regular expression
147+ // Note: line for pos is 0-based and editor lines numbers are 1-based
148+ initCodeHintTest ( "testRegexp.js" , pos ) ;
149+
150+ runs ( function ( ) {
151+ editor = EditorManager . getCurrentFullEditor ( ) ;
152+ expect ( editor ) . toBeTruthy ( ) ;
153+ invokeCodeHints ( ) ;
154+ expectNoHints ( ) ;
155+ editor = null ;
156+ } ) ;
157+ } ) ;
158+ } ) ;
159+
117160 describe ( "Hint Provider Registration" , function ( ) {
118161 beforeEach ( function ( ) {
119162 initCodeHintTest ( "test1.html" , { line : 0 , ch : 0 } ) ;
0 commit comments