@@ -127,9 +127,9 @@ func myRegexpMethodsTests(b: Bool, str_unknown: String) throws {
127127 // --- StringProtocol ---
128128
129129 _ = input. range ( of: " .* " , options: . regularExpression, range: nil , locale: nil ) // $ regex=.* input=input
130- _ = input. range ( of: " .* " , options: . literal, range: nil , locale: nil ) // $ SPURIOUS: regex=.* input=input
130+ _ = input. range ( of: " .* " , options: . literal, range: nil , locale: nil ) // (not a regular expression)
131131 _ = input. replacingOccurrences ( of: " .* " , with: " " , options: . regularExpression) // $ regex=.* input=input
132- _ = input. replacingOccurrences ( of: " .* " , with: " " , options: . literal) // $ SPURIOUS: regex=.* input=input
132+ _ = input. replacingOccurrences ( of: " .* " , with: " " , options: . literal) // (not a regular expression)
133133
134134 // --- NSRegularExpression ---
135135
@@ -148,12 +148,12 @@ func myRegexpMethodsTests(b: Bool, str_unknown: String) throws {
148148 let regexOptions = NSString . CompareOptions. regularExpression
149149 let regexOptions2 : NSString . CompareOptions = [ . regularExpression, . caseInsensitive]
150150 _ = inputNS. range ( of: " .* " , options: . regularExpression) // $ regex=.* input=inputNS
151- _ = inputNS. range ( of: " .* " , options: [ . regularExpression] ) // $ regex=.* input=inputNS
151+ _ = inputNS. range ( of: " .* " , options: [ . regularExpression] ) // $ MISSING: regex=.* input=inputNS
152152 _ = inputNS. range ( of: " .* " , options: regexOptions) // $ regex=.* input=inputNS
153- _ = inputNS. range ( of: " .* " , options: regexOptions2) // $ regex=.* input=inputNS
154- _ = inputNS. range ( of: " .* " , options: . literal) // $ SPURIOUS: regex=.* input=inputNS
153+ _ = inputNS. range ( of: " .* " , options: regexOptions2) // $ MISSING: regex=.* input=inputNS
154+ _ = inputNS. range ( of: " .* " , options: . literal) // (not a regular expression)
155155 _ = inputNS. replacingOccurrences ( of: " .* " , with: " " , options: . regularExpression, range: NSMakeRange ( 0 , inputNS. length) ) // $ regex=.* input=inputNS
156- _ = inputNS. replacingOccurrences ( of: " .* " , with: " " , options: . literal, range: NSMakeRange ( 0 , inputNS. length) ) // $ SPURIOUS: regex=.* input=inputNS
156+ _ = inputNS. replacingOccurrences ( of: " .* " , with: " " , options: . literal, range: NSMakeRange ( 0 , inputNS. length) ) // (not a regular expression)
157157
158158 // --- flow ---
159159
@@ -248,8 +248,8 @@ func myRegexpMethodsTests(b: Bool, str_unknown: String) throws {
248248 // parse modes set through other methods
249249
250250 let myOptions2 : NSString . CompareOptions = [ . regularExpression, . caseInsensitive]
251- _ = input. replacingOccurrences ( of: " .* " , with: " " , options: [ . regularExpression, . caseInsensitive] ) // $ regex=.* input=input MISSING: modes=IGNORECASE
252- _ = input. replacingOccurrences ( of: " .* " , with: " " , options: myOptions2) // $ regex=.* input=input MISSING: modes=IGNORECASE
253- _ = NSString ( string: " abc " ) . replacingOccurrences ( of: " .* " , with: " " , options: [ . regularExpression, . caseInsensitive] , range: NSMakeRange ( 0 , inputNS. length) ) // $ regex=.* input="call to NSString.init(string:)" MISSING: modes=IGNORECASE
254- _ = NSString ( string: " abc " ) . replacingOccurrences ( of: " .* " , with: " " , options: myOptions2, range: NSMakeRange ( 0 , inputNS. length) ) // $ regex=.* input="call to NSString.init(string:)" MISSING: modes=IGNORECASE
251+ _ = input. replacingOccurrences ( of: " .* " , with: " " , options: [ . regularExpression, . caseInsensitive] ) // $ MISSING: regex=.* input=input modes=IGNORECASE
252+ _ = input. replacingOccurrences ( of: " .* " , with: " " , options: myOptions2) // $ MISSING: regex=.* input=input modes=IGNORECASE
253+ _ = NSString ( string: " abc " ) . replacingOccurrences ( of: " .* " , with: " " , options: [ . regularExpression, . caseInsensitive] , range: NSMakeRange ( 0 , inputNS. length) ) // $ MISSING: regex=.* input="call to NSString.init(string:)" modes=IGNORECASE
254+ _ = NSString ( string: " abc " ) . replacingOccurrences ( of: " .* " , with: " " , options: myOptions2, range: NSMakeRange ( 0 , inputNS. length) ) // $ MISSING: regex=.* input="call to NSString.init(string:)" modes=IGNORECASE
255255}
0 commit comments