Merge branch 'master' into fix_underline
This commit is contained in:
@@ -1,24 +0,0 @@
|
|||||||
#! /usr/bin/env sh
|
|
||||||
|
|
||||||
# Usage: ./bin/prepare-release x.y.z
|
|
||||||
# x.y.z should be semver (e.g. 1.0.0)
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
NEW_VERSION=$1
|
|
||||||
CURRENT_PACKAGE_JSON_VERSION=$(cat package.json \
|
|
||||||
| grep version \
|
|
||||||
| head -1 \
|
|
||||||
| awk -F: '{ print $2 }' \
|
|
||||||
| sed 's/[",]//g' \
|
|
||||||
| tr -d '[[:space:]]')
|
|
||||||
|
|
||||||
# Build xterm.js into `dist`
|
|
||||||
export BUILD_DIR=dist
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
# Update version in package.json
|
|
||||||
sed -i "s/\"version\": \"$CURRENT_PACKAGE_JSON_VERSION\"/\"version\": \"$NEW_VERSION\"/g" package.json
|
|
||||||
|
|
||||||
git commit -S -s -a -m "Bump version to $NEW_VERSION"
|
|
||||||
git tag $NEW_VERSION
|
|
||||||
-22
@@ -1,22 +0,0 @@
|
|||||||
#! /usr/bin/env sh
|
|
||||||
|
|
||||||
# Usage: ./bin/release x.y.z
|
|
||||||
# x.y.z should be semver (e.g. 1.0.0)
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ -z "$1" ];
|
|
||||||
then
|
|
||||||
echo "No version supplied. Please a version argument\n"
|
|
||||||
echo "Usage: $0 VERSION\n"
|
|
||||||
echo "Example: $0 1.0.0"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
NEW_VERSION=$1
|
|
||||||
|
|
||||||
./bin/prepare-release $NEW_VERSION
|
|
||||||
|
|
||||||
git push && \
|
|
||||||
git push --tags && \
|
|
||||||
npm publish
|
|
||||||
+1
-1
@@ -294,7 +294,7 @@ export class Buffer implements IBuffer {
|
|||||||
for (let y = this.lines.length - 1; y >= 0; y--) {
|
for (let y = this.lines.length - 1; y >= 0; y--) {
|
||||||
// Check whether this line is a problem
|
// Check whether this line is a problem
|
||||||
let nextLine = this.lines.get(y) as BufferLine;
|
let nextLine = this.lines.get(y) as BufferLine;
|
||||||
if (!nextLine.isWrapped && nextLine.getTrimmedLength() <= newCols) {
|
if (!nextLine || !nextLine.isWrapped && nextLine.getTrimmedLength() <= newCols) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+59
-1
@@ -15,7 +15,7 @@ const width = 800;
|
|||||||
const height = 600;
|
const height = 600;
|
||||||
|
|
||||||
describe('InputHandler Integration Tests', function(): void {
|
describe('InputHandler Integration Tests', function(): void {
|
||||||
this.timeout(10000);
|
this.timeout(20000);
|
||||||
|
|
||||||
before(async function(): Promise<any> {
|
before(async function(): Promise<any> {
|
||||||
browser = await puppeteer.launch({
|
browser = await puppeteer.launch({
|
||||||
@@ -138,6 +138,64 @@ describe('InputHandler Integration Tests', function(): void {
|
|||||||
assert.deepEqual(await getLinesAsArray(2), [' a', ' b']);
|
assert.deepEqual(await getLinesAsArray(2), [' a', ' b']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('ED: Erase in Display, VT100 - CSI Ps J', async function(): Promise<any> {
|
||||||
|
const fixture = 'abc\\n\\rdef\\n\\rghi\x1b[2;2H';
|
||||||
|
await page.evaluate(`
|
||||||
|
// Default: Erase Below
|
||||||
|
window.term.resize(5, 5);
|
||||||
|
window.term.write('${fixture}\x1b[J')
|
||||||
|
`);
|
||||||
|
assert.deepEqual(await getLinesAsArray(3), ['abc', 'd', '']);
|
||||||
|
await page.evaluate(`
|
||||||
|
// 0: Erase Below
|
||||||
|
window.term.reset()
|
||||||
|
window.term.write('${fixture}\x1b[0J')
|
||||||
|
`);
|
||||||
|
assert.deepEqual(await getLinesAsArray(3), ['abc', 'd', '']);
|
||||||
|
await page.evaluate(`
|
||||||
|
// 1: Erase Above
|
||||||
|
window.term.reset()
|
||||||
|
window.term.write('${fixture}\x1b[1J')
|
||||||
|
`);
|
||||||
|
assert.deepEqual(await getLinesAsArray(3), ['', ' f', 'ghi']);
|
||||||
|
await page.evaluate(`
|
||||||
|
// 2: Erase Saved Lines (scrollback)
|
||||||
|
window.term.reset()
|
||||||
|
window.term.write('1\\n2\\n3\\n4\\n5${fixture}\x1b[3J')
|
||||||
|
`);
|
||||||
|
assert.equal(await page.evaluate(`window.term.buffer.length`), 5);
|
||||||
|
assert.deepEqual(await getLinesAsArray(5), [' 4', ' 5', 'abc', 'def', 'ghi']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('DECSED: Erase in Display, VT220 - CSI ? Ps J', async function(): Promise<any> {
|
||||||
|
const fixture = 'abc\\n\\rdef\\n\\rghi\x1b[2;2H';
|
||||||
|
await page.evaluate(`
|
||||||
|
// Default: Erase Below
|
||||||
|
window.term.resize(5, 5);
|
||||||
|
window.term.write('${fixture}\x1b[?J')
|
||||||
|
`);
|
||||||
|
assert.deepEqual(await getLinesAsArray(3), ['abc', 'd', '']);
|
||||||
|
await page.evaluate(`
|
||||||
|
// 0: Erase Below
|
||||||
|
window.term.reset()
|
||||||
|
window.term.write('${fixture}\x1b[?0J')
|
||||||
|
`);
|
||||||
|
assert.deepEqual(await getLinesAsArray(3), ['abc', 'd', '']);
|
||||||
|
await page.evaluate(`
|
||||||
|
// 1: Erase Above
|
||||||
|
window.term.reset()
|
||||||
|
window.term.write('${fixture}\x1b[?1J')
|
||||||
|
`);
|
||||||
|
assert.deepEqual(await getLinesAsArray(3), ['', ' f', 'ghi']);
|
||||||
|
await page.evaluate(`
|
||||||
|
// 2: Erase Saved Lines (scrollback)
|
||||||
|
window.term.reset()
|
||||||
|
window.term.write('1\\n2\\n3\\n4\\n5${fixture}\x1b[?3J')
|
||||||
|
`);
|
||||||
|
assert.equal(await page.evaluate(`window.term.buffer.length`), 5);
|
||||||
|
assert.deepEqual(await getLinesAsArray(5), [' 4', ' 5', 'abc', 'def', 'ghi']);
|
||||||
|
});
|
||||||
|
|
||||||
describe('DSR: Device Status Report', () => {
|
describe('DSR: Device Status Report', () => {
|
||||||
it('Status Report - CSI 5 n', async function(): Promise<any> {
|
it('Status Report - CSI 5 n', async function(): Promise<any> {
|
||||||
await page.evaluate(`
|
await page.evaluate(`
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const width = 800;
|
|||||||
const height = 600;
|
const height = 600;
|
||||||
|
|
||||||
describe('API Integration Tests', function(): void {
|
describe('API Integration Tests', function(): void {
|
||||||
this.timeout(10000);
|
this.timeout(20000);
|
||||||
|
|
||||||
before(async function(): Promise<any> {
|
before(async function(): Promise<any> {
|
||||||
browser = await puppeteer.launch({
|
browser = await puppeteer.launch({
|
||||||
|
|||||||
Reference in New Issue
Block a user