1
0
mirror of https://github.com/adobe/brackets.git synced 2024-11-20 18:02:54 +01:00
brackets/test/spec/FindReplace-known-goods
Peter Flynn ea96acefdf Fix bug #8556 (Find/Replace in Files with /^/ finds 100K matches at start
of files) - /^/ is a pathological regexp that returns 0-length matches, so
FindInFiles._getSearchMatches() was going into an infinite loop (saved from
freezing only by the 100K match limit).

This fixes Find/Replace in Files to return the correct results: an insertion
point at the start of every line in the file.

Single-file Find/Replace is inconsistent with this because it uses CM
searchcursor instead of _getSearchMatches(). But it already does avoid an
infinite loop: searchcursor forces the match to be length 1, except on
empty lines (see the line.length check before matchLen is set to 1, which
means it's left at 0 and CM returns no match for that line). So for single-file
search, the result set is the 1st char of every non-empty line.

Adds unit tests for both multi-file & single-file cases (also corrects an
older FindReplace regexp test that was broken).
2014-07-25 16:11:28 -07:00
..
changed-file Don't replace on disk if the file has changed since we searched it 2014-05-05 18:25:14 -07:00
regexp-case-insensitive Handle regexp replacement 2014-05-06 17:32:58 -07:00
regexp-case-sensitive Handle regexp replacement 2014-05-06 17:32:58 -07:00
regexp-dollar-replace Handle regexp replacement 2014-05-06 17:32:58 -07:00
regexp-replace-multiline Properly track offsets for multiline regexps in Find/Replace in Files (for #8162) 2014-06-18 19:27:41 -07:00
regexp-replace-multiline-partial Properly track offsets for multiline regexps in Find/Replace in Files (for #8162) 2014-06-18 19:27:41 -07:00
regexp-zero-length Fix bug #8556 (Find/Replace in Files with /^/ finds 100K matches at start 2014-07-25 16:11:28 -07:00
simple-case-insensitive Implement basic textual find/replace in files 2014-05-05 16:45:57 -07:00
simple-case-insensitive-except-foo.css Do replacements in memory for files that are already open 2014-05-06 15:57:40 -07:00
simple-case-insensitive-large Bump up in-memory replace limit to 20. Tweak dialog to show the limit. 2014-05-09 17:17:54 -07:00
simple-case-insensitive-modified Add unit test for find/replace in dirty document. 2014-05-15 16:50:31 -07:00
simple-case-insensitive-only-foo.css unit tests for replace in... 2014-06-03 14:53:47 -07:00
simple-case-insensitive-unchecked More Replace in Files unit test work: 2014-05-15 18:12:25 -07:00
simple-case-sensitive Implement basic textual find/replace in files 2014-05-05 16:45:57 -07:00
unchanged Add way to force replacements to be done in memory instead of on disk 2014-05-06 16:41:36 -07:00