Files
test-repo/tests/integration/__tests__/cursor-offset.js
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
912 B
JavaScript
Raw Normal View History

describe("write cursorOffset to stderr with --cursor-offset <int>", () => {
runCli("cli", ["--cursor-offset", "2", "--parser", "babel"], {
2018-05-23 16:55:06 -03:00
input: " 1",
}).test({
status: 0,
});
});
2017-10-11 00:32:45 -05:00
describe("cursorOffset should not be affected by full-width character", () => {
runCli("cli", ["--cursor-offset", "21", "--parser", "babel"], {
2020-01-14 18:58:20 +08:00
input:
'const x = ["中文", "中文", "中文", "中文", "中文", "中文", "中文", "中文", "中文", "中文", "中文"];',
2017-10-11 00:32:45 -05:00
// ^ offset = 21 ^ width = 80
}).test({
/**
* const x = [
* "中文",
* "中文",
* ^ offset = 26
* "中文",
* "中文",
* "中文",
* "中文",
* "中文",
* "中文",
* "中文",
* "中文",
* "中文"
* ];
*/
stderr: "26",
2017-10-11 00:32:45 -05:00
status: 0,
});
});