private void VerifyReplace(VimRegexOptions options, string pattern, string input, string replace, string result, VimRegexReplaceCount count = null) { count = count ?? VimRegexReplaceCount.All; var regex = VimRegexFactory.Create(pattern, options); Assert.True(regex.IsSome()); var noMagic = VimRegexOptions.NoMagic == (options & VimRegexOptions.NoMagic); var replaceData = new VimRegexReplaceData(Environment.NewLine, !noMagic, count); Assert.Equal(result, regex.Value.Replace(input, replace, replaceData, _registerMap)); }
private void VerifyReplace(VimRegexOptions options, string pattern, string input, string replace, string result, VimRegexReplaceCount count = null) { count = count ?? VimRegexReplaceCount.All; var regex = VimRegexFactory.Create(pattern, options); Assert.True(regex.IsSome()); var noMagic = VimRegexOptions.NoMagic == (options & VimRegexOptions.NoMagic); var replaceData = new VimRegexReplaceData(Environment.NewLine, !noMagic, count); Assert.Equal(result, regex.Value.Replace(input, replace, replaceData, _registerMap)); }
private void VerifyReplace(string pattern, string input, string replace, string result, VimRegexReplaceCount count = null) { count = count ?? VimRegexReplaceCount.All; VerifyReplace(VimRegexOptions.Default, pattern, input, replace, result, count); }
private void VerifyReplace(string pattern, string input, string replace, string result, VimRegexReplaceCount count = null) { count = count ?? VimRegexReplaceCount.All; VerifyReplace(VimRegexOptions.Default, pattern, input, replace, result, count); }