Update tests for wrap indent
This commit is contained in:
parent
f625dfeea3
commit
6502a3d2cb
1 changed files with 6 additions and 5 deletions
|
|
@ -280,7 +280,7 @@ module.exports = {
|
|||
session.setUseWrapMode(true);
|
||||
session.setWrapLimitRange(12, 12);
|
||||
session.adjustWrapLimit(80);
|
||||
|
||||
session.setOption("wrapMethod", "text");
|
||||
assert.position(session.documentToScreenPosition(0, 11), 0, 11);
|
||||
assert.position(session.documentToScreenPosition(0, 12), 1, 0);
|
||||
},
|
||||
|
|
@ -388,26 +388,27 @@ module.exports = {
|
|||
}
|
||||
|
||||
EditSession.prototype.$wrapAsCode = true;
|
||||
EditSession.prototype.$indentSubsequentLines = false;
|
||||
// Basic splitting.
|
||||
computeAndAssert("foo bar foo bar", [ 12 ]);
|
||||
computeAndAssert("foo bar f bar", [ 12 ]);
|
||||
computeAndAssert("foo bar f r", [ 12 ]); // 14 if we enable
|
||||
computeAndAssert("foo bar foo bar foo bara foo", [12, 25]);
|
||||
computeAndAssert("foo bar foo bar foo bara foo", [12, 20]);
|
||||
|
||||
// Don't split if there is only whitespaces/tabs at the end of the line.
|
||||
computeAndAssert("foo foo foo \t \t", [ ]);
|
||||
|
||||
// If there is no space to split, force split.
|
||||
computeAndAssert("foooooooooooooo", [ 12 ]);
|
||||
computeAndAssert("fooooooooooooooooooooooooooo", [12, 24]);
|
||||
computeAndAssert("foo bar fooooooooooobooooooo", [8, 20]);
|
||||
computeAndAssert("fooooooooooooooooooooooooooo", [12, 20]);
|
||||
computeAndAssert("foo bar fooooooooooobooooooo", [8, 16, 24]);
|
||||
|
||||
// Basic splitting + tabs.
|
||||
computeAndAssert("foo \t\tbar", [ 6 ]);
|
||||
computeAndAssert("foo \t \tbar", [ 7 ]);
|
||||
|
||||
// Ignore spaces/tabs at beginning of split.
|
||||
computeAndAssert("foo \t \t \t \t bar", [ 7 ]); // 14
|
||||
computeAndAssert("foo \t \t \t \t bar", [7, 13]); // 14
|
||||
|
||||
// Test wrapping for asian characters.
|
||||
computeAndAssert("ぁぁ", [1], 2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue