mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
#1835 add viewColumn property to TextEditor, not yet decided if we also need an event to signal changes
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import {workspace, window} from 'vscode';
|
||||
import {workspace, window, ViewColumn} from 'vscode';
|
||||
import {join} from 'path';
|
||||
import {cleanUp, pathEquals} from './utils';
|
||||
|
||||
@@ -14,7 +14,7 @@ suite("window namespace tests", () => {
|
||||
|
||||
teardown(cleanUp);
|
||||
|
||||
test('active text editor', () => {
|
||||
test('editor, active text editor', () => {
|
||||
return workspace.openTextDocument(join(workspace.rootPath, './far.js')).then(doc => {
|
||||
return window.showTextDocument(doc).then((editor) => {
|
||||
const active = window.activeTextEditor;
|
||||
@@ -23,4 +23,20 @@ suite("window namespace tests", () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('editor, assign and check view columns', () => {
|
||||
|
||||
return workspace.openTextDocument(join(workspace.rootPath, './far.js')).then(doc => {
|
||||
let p1 = window.showTextDocument(doc, ViewColumn.One).then(editor => {
|
||||
assert.equal(editor.viewColumn, ViewColumn.One);
|
||||
});
|
||||
let p2 = window.showTextDocument(doc, ViewColumn.Two).then(editor => {
|
||||
assert.equal(editor.viewColumn, ViewColumn.Two);
|
||||
});
|
||||
let p3 = window.showTextDocument(doc, ViewColumn.Three).then(editor => {
|
||||
assert.equal(editor.viewColumn, ViewColumn.Three);
|
||||
});
|
||||
return Promise.all([p1, p2, p3]);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user