(name, options)
| 4604 | |
| 4605 | // More complex substitute tests that test both pcre and nopcre options. |
| 4606 | function testSubstitute(name, options) { |
| 4607 | testVim(name + '_pcre', function(cm, vim, helpers) { |
| 4608 | cm.setCursor(1, 0); |
| 4609 | CodeMirror.Vim.setOption('pcre', true); |
| 4610 | helpers.doEx(options.expr); |
| 4611 | eq(options.expectedValue, cm.getValue()); |
| 4612 | }, options); |
| 4613 | // If no noPcreExpr is defined, assume that it's the same as the expr. |
| 4614 | var noPcreExpr = options.noPcreExpr ? options.noPcreExpr : options.expr; |
| 4615 | testVim(name + '_nopcre', function(cm, vim, helpers) { |
| 4616 | cm.setCursor(1, 0); |
| 4617 | CodeMirror.Vim.setOption('pcre', false); |
| 4618 | helpers.doEx(noPcreExpr); |
| 4619 | eq(options.expectedValue, cm.getValue()); |
| 4620 | }, options); |
| 4621 | } |
| 4622 | testSubstitute('ex_substitute_capture', { |
| 4623 | value: 'a11 a12 a13', |
| 4624 | expectedValue: 'a1111 a1212 a1313', |
no test coverage detected
searching dependent graphs…