occur+isearch: fixing tests
This commit is contained in:
parent
eb25810456
commit
227f500a2c
2 changed files with 5 additions and 5 deletions
|
|
@ -33,7 +33,7 @@ define(function(require, exports, module) {
|
||||||
var config = require("../config");
|
var config = require("../config");
|
||||||
var oop = require("../lib/oop");
|
var oop = require("../lib/oop");
|
||||||
var HashHandler = require("../keyboard/hash_handler").HashHandler;
|
var HashHandler = require("../keyboard/hash_handler").HashHandler;
|
||||||
var occurStartCommand = require("ace/commands/occur_commands").occurStartCommand;
|
var occurStartCommand = require("./occur_commands").occurStartCommand;
|
||||||
|
|
||||||
// These commands can be installed in a normal key handler to start iSearch:
|
// These commands can be installed in a normal key handler to start iSearch:
|
||||||
exports.iSearchStartCommands = [{
|
exports.iSearchStartCommands = [{
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ var MockRenderer = require("./test/mockrenderer").MockRenderer;
|
||||||
var Range = require("./range").Range;
|
var Range = require("./range").Range;
|
||||||
var assert = require("./test/assertions");
|
var assert = require("./test/assertions");
|
||||||
var Occur = require("./occur").Occur;
|
var Occur = require("./occur").Occur;
|
||||||
var occurCommands = require("./commands/occur_commands").commands;
|
var occurStartCommand = require("./commands/occur_commands").occurStartCommand;
|
||||||
var editor, occur;
|
var editor, occur;
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
@ -83,7 +83,7 @@ module.exports = {
|
||||||
// setup
|
// setup
|
||||||
var text = 'hel\nlo\n\nwo\nrld\n';
|
var text = 'hel\nlo\n\nwo\nrld\n';
|
||||||
editor.session.insert({row: 0, column: 0}, text);
|
editor.session.insert({row: 0, column: 0}, text);
|
||||||
editor.commands.addCommands(occurCommands);
|
editor.commands.addCommand(occurStartCommand);
|
||||||
|
|
||||||
// run occur for lines including 'o'
|
// run occur for lines including 'o'
|
||||||
editor.execCommand('occur', {needle: 'o'});
|
editor.execCommand('occur', {needle: 'o'});
|
||||||
|
|
@ -107,7 +107,7 @@ module.exports = {
|
||||||
// setup
|
// setup
|
||||||
var text = 'hel\nlo\n\nwo\nrld\n';
|
var text = 'hel\nlo\n\nwo\nrld\n';
|
||||||
editor.session.insert({row: 0, column: 0}, text);
|
editor.session.insert({row: 0, column: 0}, text);
|
||||||
editor.commands.addCommands(occurCommands);
|
editor.commands.addCommand(occurStartCommand);
|
||||||
editor.moveCursorToPosition({row: 1, column: 1});
|
editor.moveCursorToPosition({row: 1, column: 1});
|
||||||
|
|
||||||
// run occur for lines including 'o'
|
// run occur for lines including 'o'
|
||||||
|
|
@ -126,7 +126,7 @@ module.exports = {
|
||||||
// setup
|
// setup
|
||||||
var text = 'x\nabc1\nx\nabc2\n';
|
var text = 'x\nabc1\nx\nabc2\n';
|
||||||
editor.session.insert({row: 0, column: 0}, text);
|
editor.session.insert({row: 0, column: 0}, text);
|
||||||
editor.commands.addCommands(occurCommands);
|
editor.commands.addCommand(occurStartCommand);
|
||||||
|
|
||||||
// orig -> occur1
|
// orig -> occur1
|
||||||
editor.execCommand('occur', {needle: 'abc'});
|
editor.execCommand('occur', {needle: 'abc'});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue