forked from ajaxorg/ace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathada_test.js
30 lines (24 loc) · 848 Bytes
/
ada_test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"use strict";
var EditSession = require("../edit_session").EditSession;
var AdaMode = require("./ada").Mode;
var assert = require("../test/assertions");
module.exports = {
setUp : function() {
this.mode = new AdaMode();
},
"test: auto outdent after 'begin' and 'end'": function() {
assert.ok(this.mode.checkOutdent("start", " begi", "n"));
assert.ok(this.mode.checkOutdent("start", " en", "d"));
},
"test: auto outdent" : function() {
var session = new EditSession([
"procedure Pouet is",
" begin"
]);
this.mode.autoOutdent("start", session, 1);
assert.equal("begin", session.getLine(1));
}
};
if (typeof module !== "undefined" && module === require.main) {
require("asyncjs").test.testcase(module.exports).exec();
}