Set allowProposedApi default to false

Fixes #2826
This commit is contained in:
Daniel Imms
2022-07-27 08:20:54 -07:00
parent fafa7efd5e
commit 238a2bafb1
6 changed files with 18 additions and 17 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ export const DEFAULT_OPTIONS: Readonly<ITerminalOptions> = {
macOptionClickForcesSelection: false,
minimumContrastRatio: 1,
disableStdin: false,
allowProposedApi: true,
allowProposedApi: false,
allowTransparency: false,
tabStopWidth: 8,
theme: {},
+11 -11
View File
@@ -12,7 +12,7 @@ let term: Terminal;
describe('Headless API Tests', function (): void {
beforeEach(() => {
// Create default terminal to be used by most tests
term = new Terminal();
term = new Terminal({ allowProposedApi: true });
});
it('Default options', async () => {
@@ -102,7 +102,7 @@ describe('Headless API Tests', function (): void {
});
it('clear', async () => {
term = new Terminal({ rows: 5 });
term = new Terminal({ rows: 5, allowProposedApi: true });
for (let i = 0; i < 10; i++) {
await writeSync('\n\rtest' + i);
}
@@ -254,7 +254,7 @@ describe('Headless API Tests', function (): void {
describe('buffer', () => {
it('cursorX, cursorY', async () => {
term = new Terminal({ rows: 5, cols: 5 });
term = new Terminal({ rows: 5, cols: 5, allowProposedApi: true });
strictEqual(term.buffer.active.cursorX, 0);
strictEqual(term.buffer.active.cursorY, 0);
await writeSync('foo');
@@ -275,7 +275,7 @@ describe('Headless API Tests', function (): void {
});
it('viewportY', async () => {
term = new Terminal({ rows: 5 });
term = new Terminal({ rows: 5, allowProposedApi: true });
strictEqual(term.buffer.active.viewportY, 0);
await writeSync('\n\n\n\n');
strictEqual(term.buffer.active.viewportY, 0);
@@ -290,7 +290,7 @@ describe('Headless API Tests', function (): void {
});
it('baseY', async () => {
term = new Terminal({ rows: 5 });
term = new Terminal({ rows: 5, allowProposedApi: true });
strictEqual(term.buffer.active.baseY, 0);
await writeSync('\n\n\n\n');
strictEqual(term.buffer.active.baseY, 0);
@@ -305,7 +305,7 @@ describe('Headless API Tests', function (): void {
});
it('length', async () => {
term = new Terminal({ rows: 5 });
term = new Terminal({ rows: 5, allowProposedApi: true });
strictEqual(term.buffer.active.length, 5);
await writeSync('\n\n\n\n');
strictEqual(term.buffer.active.length, 5);
@@ -317,13 +317,13 @@ describe('Headless API Tests', function (): void {
describe('getLine', () => {
it('invalid index', async () => {
term = new Terminal({ rows: 5 });
term = new Terminal({ rows: 5, allowProposedApi: true });
strictEqual(term.buffer.active.getLine(-1), undefined);
strictEqual(term.buffer.active.getLine(5), undefined);
});
it('isWrapped', async () => {
term = new Terminal({ cols: 5 });
term = new Terminal({ cols: 5, allowProposedApi: true });
strictEqual(term.buffer.active.getLine(0)!.isWrapped, false);
strictEqual(term.buffer.active.getLine(1)!.isWrapped, false);
await writeSync('abcde');
@@ -335,7 +335,7 @@ describe('Headless API Tests', function (): void {
});
it('translateToString', async () => {
term = new Terminal({ cols: 5 });
term = new Terminal({ cols: 5, allowProposedApi: true });
strictEqual(term.buffer.active.getLine(0)!.translateToString(), ' ');
strictEqual(term.buffer.active.getLine(0)!.translateToString(true), '');
await writeSync('foo');
@@ -350,7 +350,7 @@ describe('Headless API Tests', function (): void {
});
it('getCell', async () => {
term = new Terminal({ cols: 5 });
term = new Terminal({ cols: 5, allowProposedApi: true });
strictEqual(term.buffer.active.getLine(0)!.getCell(-1), undefined);
strictEqual(term.buffer.active.getLine(0)!.getCell(5), undefined);
strictEqual(term.buffer.active.getLine(0)!.getCell(0)!.getChars(), '');
@@ -366,7 +366,7 @@ describe('Headless API Tests', function (): void {
});
it('active, normal, alternate', async () => {
term = new Terminal({ cols: 5 });
term = new Terminal({ cols: 5, allowProposedApi: true });
strictEqual(term.buffer.active.type, 'normal');
strictEqual(term.buffer.normal.type, 'normal');
strictEqual(term.buffer.alternate.type, 'alternate');