node_modules/
*.swp
-build/*
.lock-wscript
out/
Makefile.gyp
npm-debug.log
/.idea/
.env
+dist/*
+++ /dev/null
-/*
- * Implements the attach method, that
- * attaches the terminal to a WebSocket stream.
- *
- * The bidirectional argument indicates, whether the terminal should
- * send data to the socket as well and is true, by default.
- */
-
-(function (attach) {
- if (typeof exports === 'object' && typeof module === 'object') {
- /*
- * CommonJS environment
- */
- module.exports = attach(require('../../dist/xterm'));
- } else if (typeof define == 'function') {
- /*
- * Require.js is available
- */
- define(['../../dist/xterm'], attach);
- } else {
- /*
- * Plain browser environment
- */
- attach(window.Terminal);
- }
-})(function (Xterm) {
- 'use strict';
-
- /**
- * This module provides methods for attaching a terminal to a WebSocket
- * stream.
- *
- * @module xterm/addons/attach/attach
- */
- var exports = {};
-
- /**
- * Attaches the given terminal to the given socket.
- *
- * @param {Xterm} term - The terminal to be attached to the given socket.
- * @param {WebSocket} socket - The socket to attach the current terminal.
- * @param {boolean} bidirectional - Whether the terminal should send data
- * to the socket as well.
- * @param {boolean} buffered - Whether the rendering of incoming data
- * should happen instantly or at a maximum
- * frequency of 1 rendering per 10ms.
- */
- exports.attach = function (term, socket, bidirectional, buffered) {
- bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional;
- term.socket = socket;
-
- term._flushBuffer = function () {
- term.write(term._attachSocketBuffer);
- term._attachSocketBuffer = null;
- clearTimeout(term._attachSocketBufferTimer);
- term._attachSocketBufferTimer = null;
- };
-
- term._pushToBuffer = function (data) {
- if (term._attachSocketBuffer) {
- term._attachSocketBuffer += data;
- } else {
- term._attachSocketBuffer = data;
- setTimeout(term._flushBuffer, 10);
- }
- };
-
- term._getMessage = function (ev) {
- if (buffered) {
- term._pushToBuffer(ev.data);
- } else {
- term.write(ev.data);
- }
- };
-
- term._sendData = function (data) {
- socket.send(data);
- };
-
- socket.addEventListener('message', term._getMessage);
-
- if (bidirectional) {
- term.on('data', term._sendData);
- }
-
- socket.addEventListener('close', term.detach.bind(term, socket));
- socket.addEventListener('error', term.detach.bind(term, socket));
- };
-
- /**
- * Detaches the given terminal from the given socket
- *
- * @param {Xterm} term - The terminal to be detached from the given socket.
- * @param {WebSocket} socket - The socket from which to detach the current
- * terminal.
- */
- exports.detach = function (term, socket) {
- term.off('data', term._sendData);
-
- socket = (typeof socket == 'undefined') ? term.socket : socket;
-
- if (socket) {
- socket.removeEventListener('message', term._getMessage);
- }
-
- delete term.socket;
- };
-
- /**
- * Attaches the current terminal to the given socket
- *
- * @param {WebSocket} socket - The socket to attach the current terminal.
- * @param {boolean} bidirectional - Whether the terminal should send data
- * to the socket as well.
- * @param {boolean} buffered - Whether the rendering of incoming data
- * should happen instantly or at a maximum
- * frequency of 1 rendering per 10ms.
- */
- Xterm.prototype.attach = function (socket, bidirectional, buffered) {
- return exports.attach(this, socket, bidirectional, buffered);
- };
-
- /**
- * Detaches the current terminal from the given socket.
- *
- * @param {WebSocket} socket - The socket from which to detach the current
- * terminal.
- */
- Xterm.prototype.detach = function (socket) {
- return exports.detach(this, socket);
- };
-
- return exports;
-});
+++ /dev/null
-<!doctype html>
-<html>
- <head>
- <link rel="stylesheet" href="../../src/xterm.css" />
- <link rel="stylesheet" href="../../demo/style.css" />
- <script src="../../src/xterm.js"></script>
- <script src="attach.js"></script>
- <style>
- body {
- color: #111;
- }
-
- h1, h2 {
- color: #444;
- border-bottom: 1px solid #ddd;
- text-align: left;
- }
-
- form {
- margin-bottom: 32px;
- }
-
- input, button {
- line-height: 22px;
- font-size: 16px;
- display: inline-block;
- border-radius: 2px;
- border: 1px solid #ccc;
- }
-
- input {
- height: 22px;
- padding-left: 4px;
- padding-right: 4px;
- }
-
- button {
- height: 28px;
- background-color: #ccc;
- cursor: pointer;
- color: #333;
- }
-
- .container {
- max-width: 900px;
- margin: 0 auto;
- }
- </style>
- </head>
- <body>
- <div class="container">
-
- <h1>
- xterm.js: socket attach
- </h1>
- <p>
- Attach the terminal to a WebSocket terminal stream with ease. Perfect for attaching to your
- Docker containers.
- </p>
- <h2>
- Socket information
- </h2>
- <form id="socket-form">
- <input id="socket-url"
- type="text"
- placeholder="Enter socket url (e.g. ws://mysock)"
- autofocus />
- <button>
- Attach
- </button>
- </form>
- <div id="terminal-container"></div>
-
- </div>
- <script>
- var term = new Terminal(),
- container = document.getElementById('terminal-container'),
- socketUrl = document.getElementById('socket-url'),
- socketForm = document.getElementById('socket-form');
-
- socketForm.addEventListener('submit', function (ev) {
- ev.preventDefault();
- var url = socketUrl.value,
- sock = new WebSocket(url);
- sock.addEventListener('open', function () {
- term.attach(sock);
- });
- });
-
- term.open(container);
- </script>
- </body>
-</html>
\ No newline at end of file
+++ /dev/null
-{
- "name": "xterm.attach",
- "main": "attach.js",
- "private": true
-}
+++ /dev/null
-/*
- * Fit terminal columns and rows to the dimensions of its
- * DOM element.
- *
- * Approach:
- * - Rows: Truncate the division of the terminal parent element height
- * by the terminal row height
- *
- * - Columns: Truncate the division of the terminal parent element width by
- * the terminal character width (apply display: inline at the
- * terminal row and truncate its width with the current number
- * of columns)
- */
-(function (fit) {
- if (typeof exports === 'object' && typeof module === 'object') {
- /*
- * CommonJS environment
- */
- module.exports = fit(require('../../dist/xterm'));
- } else if (typeof define == 'function') {
- /*
- * Require.js is available
- */
- define(['../../dist/xterm'], fit);
- } else {
- /*
- * Plain browser environment
- */
- fit(window.Terminal);
- }
-})(function (Xterm) {
- /**
- * This module provides methods for fitting a terminal's size to a parent container.
- *
- * @module xterm/addons/fit/fit
- */
- var exports = {};
-
- exports.proposeGeometry = function (term) {
- var parentElementStyle = window.getComputedStyle(term.element.parentElement),
- parentElementHeight = parseInt(parentElementStyle.getPropertyValue('height')),
- parentElementWidth = parseInt(parentElementStyle.getPropertyValue('width')),
- elementStyle = window.getComputedStyle(term.element),
- elementPaddingVer = parseInt(elementStyle.getPropertyValue('padding-top')) + parseInt(elementStyle.getPropertyValue('padding-bottom')),
- elementPaddingHor = parseInt(elementStyle.getPropertyValue('padding-right')) + parseInt(elementStyle.getPropertyValue('padding-left')),
- availableHeight = parentElementHeight - elementPaddingVer,
- availableWidth = parentElementWidth - elementPaddingHor,
- container = term.rowContainer,
- subjectRow = term.rowContainer.firstElementChild,
- contentBuffer = subjectRow.innerHTML,
- characterHeight,
- rows,
- characterWidth,
- cols,
- geometry;
-
- subjectRow.style.display = 'inline';
- subjectRow.innerHTML = 'W'; // Common character for measuring width, although on monospace
- characterWidth = subjectRow.getBoundingClientRect().width;
- subjectRow.style.display = ''; // Revert style before calculating height, since they differ.
- characterHeight = parseInt(subjectRow.offsetHeight);
- subjectRow.innerHTML = contentBuffer;
-
- rows = parseInt(availableHeight / characterHeight);
- cols = parseInt(availableWidth / characterWidth) - 1;
-
- geometry = {cols: cols, rows: rows};
- return geometry;
- };
-
- exports.fit = function (term) {
- var geometry = exports.proposeGeometry(term);
-
- term.resize(geometry.cols, geometry.rows);
- };
-
- Xterm.prototype.proposeGeometry = function () {
- return exports.proposeGeometry(this);
- };
-
- Xterm.prototype.fit = function () {
- return exports.fit(this);
- };
-
- return exports;
-});
+++ /dev/null
-{
- "name": "xterm.fit",
- "main": "fit.js",
- "private": true
-}
+++ /dev/null
-.xterm.fullscreen {
- position: fixed;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- width: auto;
- height: auto;
- z-index: 255;
-}
+++ /dev/null
-/*
- * Fullscreen addon for xterm.js
- *
- * Implements the toggleFullscreen function.
- *
- * If the `fullscreen` argument has been supplied, then
- * if it is true, the fullscreen mode gets turned on,
- * if it is false or null, the fullscreen mode gets turned off.
- *
- * If the `fullscreen` argument has not been supplied, the
- * fullscreen mode is being toggled.
- */
-(function (fullscreen) {
- if (typeof exports === 'object' && typeof module === 'object') {
- /*
- * CommonJS environment
- */
- module.exports = fullscreen(require('../../dist/xterm'));
- } else if (typeof define == 'function') {
- /*
- * Require.js is available
- */
- define(['../../dist/xterm'], fullscreen);
- } else {
- /*
- * Plain browser environment
- */
- fullscreen(window.Terminal);
- }
-})(function (Xterm) {
- var exports = {};
-
- exports.toggleFullScreen = function (term, fullscreen) {
- var fn;
-
- if (typeof fullscreen == 'undefined') {
- fn = (term.element.classList.contains('fullscreen')) ? 'remove' : 'add';
- } else if (!fullscreen) {
- fn = 'remove';
- } else {
- fn = 'add';
- }
-
- term.element.classList[fn]('fullscreen');
- };
-
- Xterm.prototype.toggleFullscreen = function (fullscreen) {
- exports.toggleFullScreen(this, fullscreen);
- };
-
- return exports;
-});
+++ /dev/null
-{
- "name": "xterm.fullscreen",
- "main": "fullscreen.js",
- "private": true
-}
+++ /dev/null
-<!doctype html>
-<html>
- <head>
- <link rel="stylesheet" href="../../src/xterm.css" />
- <link rel="stylesheet" href="../../demo/style.css" />
- <script src="../../src/xterm.js"></script>
- <script src="linkify.js"></script>
- <style>
- body {
- color: #111;
- }
-
- #terminal-container {
- max-width: 900px;
- margin: 0 auto;
- }
-
- #terminal-container a {
- color: #fff;
- }
- </style>
- </head>
- <body>
- <div id="terminal-container"></div>
- <script>
- var term = new Terminal(),
- container = document.getElementById('terminal-container');
-
- term.open(container);
- term.writeln('Hello, welcome to xterm.js');
- term.writeln('');
- term.writeln('Check it out at github.com/sourcelair/xterm.js');
- term.linkify();
- </script>
- </body>
-</html>
\ No newline at end of file
+++ /dev/null
-(function (linkify) {
- if (typeof exports === 'object' && typeof module === 'object') {
- /*
- * CommonJS environment
- */
- module.exports = linkify(require('../../dist/xterm'));
- } else if (typeof define == 'function') {
- /*
- * Require.js is available
- */
- define(['../../dist/xterm'], linkify);
- } else {
- /*
- * Plain browser environment
- */
- linkify(window.Terminal);
- }
-})(function (Xterm) {
- 'use strict';
-
- /**
- * This module provides methods for convertings valid URL substrings
- * into HTML anchor elements (links), inside a terminal view.
- *
- * @module xterm/addons/linkify/linkify
- */
- var exports = {},
- protocolClause = '(https?:\\/\\/)',
- domainCharacterSet = '[\\da-z\\.-]+',
- negatedDomainCharacterSet = '[^\\da-z\\.-]+',
- domainBodyClause = '(' + domainCharacterSet + ')',
- tldClause = '([a-z\\.]{2,6})',
- ipClause = '((\\d{1,3}\\.){3}\\d{1,3})',
- portClause = '(:\\d{1,5})',
- hostClause = '((' + domainBodyClause + '\\.' + tldClause + ')|' + ipClause + ')' + portClause + '?',
- pathClause = '(\\/[\\/\\w\\.-]*)*',
- negatedPathCharacterSet = '[^\\/\\w\\.-]+',
- bodyClause = hostClause + pathClause,
- start = '(?:^|' + negatedDomainCharacterSet + ')(',
- end = ')($|' + negatedPathCharacterSet + ')',
- lenientUrlClause = start + protocolClause + '?' + bodyClause + end,
- strictUrlClause = start + protocolClause + bodyClause + end,
- lenientUrlRegex = new RegExp(lenientUrlClause),
- strictUrlRegex = new RegExp(strictUrlClause);
-
- /**
- * Converts all valid URLs found in the given terminal line into
- * hyperlinks. The terminal line can be either the HTML element itself
- * or the index of the termina line in the children of the terminal
- * rows container.
- *
- * @param {Xterm} terminal - The terminal that owns the given line.
- * @param {number|HTMLDivElement} line - The terminal line that should get
- * "linkified".
- * @param {boolean} lenient - The regex type that will be used to identify links. If lenient is
- * false, the regex requires a protocol clause. Defaults to true.
- * @param {string} target - Sets target="" attribute with value provided to links.
- * Default doesn't set target attribute
- * @emits linkify
- * @emits linkify:line
- */
- exports.linkifyTerminalLine = function (terminal, line, lenient, target) {
- if (typeof line == 'number') {
- line = terminal.rowContainer.children[line];
- } else if (! (line instanceof HTMLDivElement)) {
- var message = 'The "line" argument should be either a number';
- message += ' or an HTMLDivElement';
-
- throw new TypeError(message);
- }
-
- if (typeof target === 'undefined') {
- target = '';
- } else {
- target = 'target="' + target + '"';
- }
-
- var buffer = document.createElement('span'),
- nodes = line.childNodes;
-
- for (var j=0; j<nodes.length; j++) {
- var node = nodes[j],
- match;
-
- /**
- * Since we cannot access the TextNode's HTML representation
- * from the instance itself, we assign its data as textContent
- * to a dummy buffer span, in order to retrieve the TextNode's
- * HTML representation from the buffer's innerHTML.
- */
- buffer.textContent = node.data;
-
- var nodeHTML = buffer.innerHTML;
-
- /**
- * Apply function only on TextNodes
- */
- if (node.nodeType != node.TEXT_NODE) {
- continue;
- }
-
- var url = exports.findLinkMatch(node.data, lenient);
-
- if (!url) {
- continue;
- }
-
- var startsWithProtocol = new RegExp('^' + protocolClause),
- urlHasProtocol = url.match(startsWithProtocol),
- href = (urlHasProtocol) ? url : 'http://' + url,
- link = '<a href="' + href + '" ' + target + '>' + url + '</a>',
- newHTML = nodeHTML.replace(url, link);
-
- line.innerHTML = line.innerHTML.replace(nodeHTML, newHTML);
- }
-
- /**
- * This event gets emitted when conversion of all URL susbtrings
- * to HTML anchor elements (links) has finished, for a specific
- * line of the current Xterm instance.
- *
- * @event linkify:line
- */
- terminal.emit('linkify:line', line);
- };
-
- /**
- * Finds a link within a block of text.
- *
- * @param {string} text - The text to search .
- * @param {boolean} lenient - Whether to use the lenient search.
- * @return {string} A URL.
- */
- exports.findLinkMatch = function (text, lenient) {
- var match = text.match(lenient ? lenientUrlRegex : strictUrlRegex);
- if (!match || match.length === 0) {
- return null;
- }
- return match[1];
- }
-
- /**
- * Converts all valid URLs found in the terminal view into hyperlinks.
- *
- * @param {Xterm} terminal - The terminal that should get "linkified".
- * @param {boolean} lenient - The regex type that will be used to identify links. If lenient is
- * false, the regex requires a protocol clause. Defaults to true.
- * @param {string} target - Sets target="" attribute with value provided to links.
- * Default doesn't set target attribute
- * @emits linkify
- * @emits linkify:line
- */
- exports.linkify = function (terminal, lenient, target) {
- var rows = terminal.rowContainer.children;
-
- lenient = (typeof lenient == "boolean") ? lenient : true;
- for (var i=0; i<rows.length; i++) {
- var line = rows[i];
-
- exports.linkifyTerminalLine(terminal, line, lenient, target);
- }
-
- /**
- * This event gets emitted when conversion of all URL substrings to
- * HTML anchor elements (links) has finished for the current Xterm
- * instance's view.
- *
- * @event linkify
- */
- terminal.emit('linkify');
- };
-
- /**
- * Extend Xterm prototype.
- */
-
- /**
- * Converts all valid URLs found in the current terminal linte into
- * hyperlinks.
- *
- * @memberof Xterm
- * @param {number|HTMLDivElement} line - The terminal line that should get
- * "linkified".
- * @param {boolean} lenient - The regex type that will be used to identify links. If lenient is
- * false, the regex requires a protocol clause. Defaults to true.
- * @param {string} target - Sets target="" attribute with value provided to links.
- * Default doesn't set target attribute
- */
- Xterm.prototype.linkifyTerminalLine = function (line, lenient, target) {
- return exports.linkifyTerminalLine(this, line, lenient, target);
- };
-
- /**
- * Converts all valid URLs found in the current terminal into hyperlinks.
- *
- * @memberof Xterm
- * @param {boolean} lenient - The regex type that will be used to identify links. If lenient is
- * false, the regex requires a protocol clause. Defaults to true.
- * @param {string} target - Sets target="" attribute with value provided to links.
- * Default doesn't set target attribute
- */
- Xterm.prototype.linkify = function (lenient, target) {
- return exports.linkify(this, lenient, target);
- };
-
- return exports;
-});
+++ /dev/null
-{
- "name": "xterm.linkify",
- "main": "linkify.js",
- "private": true
-}
+++ /dev/null
-{
- "name": "xterm.terminado",
- "main": "terminado.js",
- "private": true
-}
+++ /dev/null
-/*
- * Implements the attach method that
- * attaches the terminal to a Terminado WebSocket stream.
- *
- * The bidirectional argument indicates, whether the terminal should
- * send data to the socket as well and is true, by default.
- */
-
-(function (attach) {
- if (typeof exports === 'object' && typeof module === 'object') {
- /*
- * CommonJS environment
- */
- module.exports = attach(require('../../src/xterm'));
- } else if (typeof define == 'function') {
- /*
- * Require.js is available
- */
- define(['../../src/xterm'], attach);
- } else {
- /*
- * Plain browser environment
- */
- attach(window.Terminal);
- }
-})(function (Xterm) {
- 'use strict';
-
- /**
- * This module provides methods for attaching a terminal to a WebSocket
- * stream.
- *
- * @module xterm/addons/attach/attach
- */
- var exports = {};
-
- /**
- * Attaches the given terminal to the given socket.
- *
- * @param {Xterm} term - The terminal to be attached to the given socket.
- * @param {WebSocket} socket - The socket to attach the current terminal.
- * @param {boolean} bidirectional - Whether the terminal should send data
- * to the socket as well.
- * @param {boolean} buffered - Whether the rendering of incoming data
- * should happen instantly or at a maximum
- * frequency of 1 rendering per 10ms.
- */
- exports.terminadoAttach = function (term, socket, bidirectional, buffered) {
- bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional;
- term.socket = socket;
-
- term._flushBuffer = function () {
- term.write(term._attachSocketBuffer);
- term._attachSocketBuffer = null;
- clearTimeout(term._attachSocketBufferTimer);
- term._attachSocketBufferTimer = null;
- };
-
- term._pushToBuffer = function (data) {
- if (term._attachSocketBuffer) {
- term._attachSocketBuffer += data;
- } else {
- term._attachSocketBuffer = data;
- setTimeout(term._flushBuffer, 10);
- }
- };
-
- term._getMessage = function (ev) {
- var data = JSON.parse(ev.data)
- if( data[0] == "stdout" ) {
- if (buffered) {
- term._pushToBuffer(data[1]);
- } else {
- term.write(data[1]);
- }
- }
- };
-
- term._sendData = function (data) {
- socket.send(JSON.stringify(['stdin', data]));
- };
-
- term._setSize = function (size) {
- socket.send(JSON.stringify(['set_size', size.rows, size.cols]));
- };
-
- socket.addEventListener('message', term._getMessage);
-
- if (bidirectional) {
- term.on('data', term._sendData);
- }
- term.on('resize', term._setSize);
-
- socket.addEventListener('close', term.terminadoDetach.bind(term, socket));
- socket.addEventListener('error', term.terminadoDetach.bind(term, socket));
- };
-
- /**
- * Detaches the given terminal from the given socket
- *
- * @param {Xterm} term - The terminal to be detached from the given socket.
- * @param {WebSocket} socket - The socket from which to detach the current
- * terminal.
- */
- exports.terminadoDetach = function (term, socket) {
- term.off('data', term._sendData);
-
- socket = (typeof socket == 'undefined') ? term.socket : socket;
-
- if (socket) {
- socket.removeEventListener('message', term._getMessage);
- }
-
- delete term.socket;
- };
-
- /**
- * Attaches the current terminal to the given socket
- *
- * @param {WebSocket} socket - The socket to attach the current terminal.
- * @param {boolean} bidirectional - Whether the terminal should send data
- * to the socket as well.
- * @param {boolean} buffered - Whether the rendering of incoming data
- * should happen instantly or at a maximum
- * frequency of 1 rendering per 10ms.
- */
- Xterm.prototype.terminadoAttach = function (socket, bidirectional, buffered) {
- return exports.terminadoAttach(this, socket, bidirectional, buffered);
- };
-
- /**
- * Detaches the current terminal from the given socket.
- *
- * @param {WebSocket} socket - The socket from which to detach the current
- * terminal.
- */
- Xterm.prototype.terminadoDetach = function (socket) {
- return exports.terminadoDetach(this, socket);
- };
-
- return exports;
-});
-#! /usr/bin/env sh
+#! /usr/bin/env bash
-mkdir -p build
-browserify src/xterm.js --standalone Terminal -p [ tsify ] --outfile build/xterm.js
-cp src/xterm.css build/xterm.css
+# Build all TypeScript files (including tests) to out/
+tsc
+
+# Concat all xterm.js files into a single file and output as a UMD to dist/xterm.js
+browserify out/xterm.js --standalone Terminal -p [ tsify ] --outfile dist/xterm.js
+
+# Copy all CSS files from src/ to dist/
+cd src
+find . -name '*.css' | cpio -pdm ../dist
+cd ..
+
+# Copy addons from out/ to dist/
+cd out/addons
+find . -name '*.js' | cpio -pdm ../../dist/addons
+cd ../..
logs = {};
app.use('/build', express.static(__dirname + '/../build'));
-app.use('/addons', express.static(__dirname + '/../addons'));
app.get('/', function(req, res){
res.sendFile(__dirname + '/index.html');
<head>
<title>xterm.js demo</title>
<link rel="stylesheet" href="../build/xterm.css" />
- <link rel="stylesheet" href="../addons/fullscreen/fullscreen.css" />
+ <link rel="stylesheet" href="../build/addons/fullscreen/fullscreen.css" />
<link rel="stylesheet" href="style.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/fetch/1.0.0/fetch.min.js"></script>
- <script src="../build/xterm.js" ></script>
- <script src="../addons/attach/attach.js" ></script>
- <script src="../addons/fit/fit.js" ></script>
- <script src="../addons/fullscreen/fullscreen.js" ></script>
+ <script src="/build/xterm.js" ></script>
+ <script src="/build/addons/attach/attach.js" ></script>
+ <script src="/build/addons/fit/fit.js" ></script>
+ <script src="/build/addons/fullscreen/fullscreen.js" ></script>
</head>
<body>
<h1>xterm.js: xterm, in the browser</h1>
"typescript": "^2.0.3"
},
"scripts": {
- "start": "nodemon --watch src --watch addons --exec bash -c './bin/build && node demo/app'",
- "test": "./bin/build && mocha --recursive ./test/*test.js ./test/**/*test.js",
+ "start": "nodemon --watch src --watch addons --watch demo --exec bash -c './bin/build && node demo/app'",
+ "test": "./bin/build && mocha --recursive ./out",
"build:docs": "jsdoc -c jsdoc.json",
"build": "./bin/build"
}
--- /dev/null
+/*
+ * Implements the attach method, that
+ * attaches the terminal to a WebSocket stream.
+ *
+ * The bidirectional argument indicates, whether the terminal should
+ * send data to the socket as well and is true, by default.
+ */
+
+(function (attach) {
+ if (typeof exports === 'object' && typeof module === 'object') {
+ /*
+ * CommonJS environment
+ */
+ module.exports = attach(require('../../xterm'));
+ } else if (typeof define == 'function') {
+ /*
+ * Require.js is available
+ */
+ define(['../../xterm'], attach);
+ } else {
+ /*
+ * Plain browser environment
+ */
+ attach(window.Terminal);
+ }
+})(function (Xterm) {
+ 'use strict';
+
+ /**
+ * This module provides methods for attaching a terminal to a WebSocket
+ * stream.
+ *
+ * @module xterm/addons/attach/attach
+ */
+ var exports = {};
+
+ /**
+ * Attaches the given terminal to the given socket.
+ *
+ * @param {Xterm} term - The terminal to be attached to the given socket.
+ * @param {WebSocket} socket - The socket to attach the current terminal.
+ * @param {boolean} bidirectional - Whether the terminal should send data
+ * to the socket as well.
+ * @param {boolean} buffered - Whether the rendering of incoming data
+ * should happen instantly or at a maximum
+ * frequency of 1 rendering per 10ms.
+ */
+ exports.attach = function (term, socket, bidirectional, buffered) {
+ bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional;
+ term.socket = socket;
+
+ term._flushBuffer = function () {
+ term.write(term._attachSocketBuffer);
+ term._attachSocketBuffer = null;
+ clearTimeout(term._attachSocketBufferTimer);
+ term._attachSocketBufferTimer = null;
+ };
+
+ term._pushToBuffer = function (data) {
+ if (term._attachSocketBuffer) {
+ term._attachSocketBuffer += data;
+ } else {
+ term._attachSocketBuffer = data;
+ setTimeout(term._flushBuffer, 10);
+ }
+ };
+
+ term._getMessage = function (ev) {
+ if (buffered) {
+ term._pushToBuffer(ev.data);
+ } else {
+ term.write(ev.data);
+ }
+ };
+
+ term._sendData = function (data) {
+ socket.send(data);
+ };
+
+ socket.addEventListener('message', term._getMessage);
+
+ if (bidirectional) {
+ term.on('data', term._sendData);
+ }
+
+ socket.addEventListener('close', term.detach.bind(term, socket));
+ socket.addEventListener('error', term.detach.bind(term, socket));
+ };
+
+ /**
+ * Detaches the given terminal from the given socket
+ *
+ * @param {Xterm} term - The terminal to be detached from the given socket.
+ * @param {WebSocket} socket - The socket from which to detach the current
+ * terminal.
+ */
+ exports.detach = function (term, socket) {
+ term.off('data', term._sendData);
+
+ socket = (typeof socket == 'undefined') ? term.socket : socket;
+
+ if (socket) {
+ socket.removeEventListener('message', term._getMessage);
+ }
+
+ delete term.socket;
+ };
+
+ /**
+ * Attaches the current terminal to the given socket
+ *
+ * @param {WebSocket} socket - The socket to attach the current terminal.
+ * @param {boolean} bidirectional - Whether the terminal should send data
+ * to the socket as well.
+ * @param {boolean} buffered - Whether the rendering of incoming data
+ * should happen instantly or at a maximum
+ * frequency of 1 rendering per 10ms.
+ */
+ Xterm.prototype.attach = function (socket, bidirectional, buffered) {
+ return exports.attach(this, socket, bidirectional, buffered);
+ };
+
+ /**
+ * Detaches the current terminal from the given socket.
+ *
+ * @param {WebSocket} socket - The socket from which to detach the current
+ * terminal.
+ */
+ Xterm.prototype.detach = function (socket) {
+ return exports.detach(this, socket);
+ };
+
+ return exports;
+});
--- /dev/null
+<!doctype html>
+<html>
+ <head>
+ <link rel="stylesheet" href="../../src/xterm.css" />
+ <link rel="stylesheet" href="../../demo/style.css" />
+ <script src="../../src/xterm.js"></script>
+ <script src="attach.js"></script>
+ <style>
+ body {
+ color: #111;
+ }
+
+ h1, h2 {
+ color: #444;
+ border-bottom: 1px solid #ddd;
+ text-align: left;
+ }
+
+ form {
+ margin-bottom: 32px;
+ }
+
+ input, button {
+ line-height: 22px;
+ font-size: 16px;
+ display: inline-block;
+ border-radius: 2px;
+ border: 1px solid #ccc;
+ }
+
+ input {
+ height: 22px;
+ padding-left: 4px;
+ padding-right: 4px;
+ }
+
+ button {
+ height: 28px;
+ background-color: #ccc;
+ cursor: pointer;
+ color: #333;
+ }
+
+ .container {
+ max-width: 900px;
+ margin: 0 auto;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="container">
+
+ <h1>
+ xterm.js: socket attach
+ </h1>
+ <p>
+ Attach the terminal to a WebSocket terminal stream with ease. Perfect for attaching to your
+ Docker containers.
+ </p>
+ <h2>
+ Socket information
+ </h2>
+ <form id="socket-form">
+ <input id="socket-url"
+ type="text"
+ placeholder="Enter socket url (e.g. ws://mysock)"
+ autofocus />
+ <button>
+ Attach
+ </button>
+ </form>
+ <div id="terminal-container"></div>
+
+ </div>
+ <script>
+ var term = new Terminal(),
+ container = document.getElementById('terminal-container'),
+ socketUrl = document.getElementById('socket-url'),
+ socketForm = document.getElementById('socket-form');
+
+ socketForm.addEventListener('submit', function (ev) {
+ ev.preventDefault();
+ var url = socketUrl.value,
+ sock = new WebSocket(url);
+ sock.addEventListener('open', function () {
+ term.attach(sock);
+ });
+ });
+
+ term.open(container);
+ </script>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+{
+ "name": "xterm.attach",
+ "main": "attach.js",
+ "private": true
+}
--- /dev/null
+/*
+ * Fit terminal columns and rows to the dimensions of its
+ * DOM element.
+ *
+ * Approach:
+ * - Rows: Truncate the division of the terminal parent element height
+ * by the terminal row height
+ *
+ * - Columns: Truncate the division of the terminal parent element width by
+ * the terminal character width (apply display: inline at the
+ * terminal row and truncate its width with the current number
+ * of columns)
+ */
+(function (fit) {
+ if (typeof exports === 'object' && typeof module === 'object') {
+ /*
+ * CommonJS environment
+ */
+ module.exports = fit(require('../../xterm'));
+ } else if (typeof define == 'function') {
+ /*
+ * Require.js is available
+ */
+ define(['../../xterm'], fit);
+ } else {
+ /*
+ * Plain browser environment
+ */
+ fit(window.Terminal);
+ }
+})(function (Xterm) {
+ /**
+ * This module provides methods for fitting a terminal's size to a parent container.
+ *
+ * @module xterm/addons/fit/fit
+ */
+ var exports = {};
+
+ exports.proposeGeometry = function (term) {
+ var parentElementStyle = window.getComputedStyle(term.element.parentElement),
+ parentElementHeight = parseInt(parentElementStyle.getPropertyValue('height')),
+ parentElementWidth = parseInt(parentElementStyle.getPropertyValue('width')),
+ elementStyle = window.getComputedStyle(term.element),
+ elementPaddingVer = parseInt(elementStyle.getPropertyValue('padding-top')) + parseInt(elementStyle.getPropertyValue('padding-bottom')),
+ elementPaddingHor = parseInt(elementStyle.getPropertyValue('padding-right')) + parseInt(elementStyle.getPropertyValue('padding-left')),
+ availableHeight = parentElementHeight - elementPaddingVer,
+ availableWidth = parentElementWidth - elementPaddingHor,
+ container = term.rowContainer,
+ subjectRow = term.rowContainer.firstElementChild,
+ contentBuffer = subjectRow.innerHTML,
+ characterHeight,
+ rows,
+ characterWidth,
+ cols,
+ geometry;
+
+ subjectRow.style.display = 'inline';
+ subjectRow.innerHTML = 'W'; // Common character for measuring width, although on monospace
+ characterWidth = subjectRow.getBoundingClientRect().width;
+ subjectRow.style.display = ''; // Revert style before calculating height, since they differ.
+ characterHeight = parseInt(subjectRow.offsetHeight);
+ subjectRow.innerHTML = contentBuffer;
+
+ rows = parseInt(availableHeight / characterHeight);
+ cols = parseInt(availableWidth / characterWidth) - 1;
+
+ geometry = {cols: cols, rows: rows};
+ return geometry;
+ };
+
+ exports.fit = function (term) {
+ var geometry = exports.proposeGeometry(term);
+
+ term.resize(geometry.cols, geometry.rows);
+ };
+
+ Xterm.prototype.proposeGeometry = function () {
+ return exports.proposeGeometry(this);
+ };
+
+ Xterm.prototype.fit = function () {
+ return exports.fit(this);
+ };
+
+ return exports;
+});
--- /dev/null
+{
+ "name": "xterm.fit",
+ "main": "fit.js",
+ "private": true
+}
--- /dev/null
+.xterm.fullscreen {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ width: auto;
+ height: auto;
+ z-index: 255;
+}
--- /dev/null
+/*
+ * Fullscreen addon for xterm.js
+ *
+ * Implements the toggleFullscreen function.
+ *
+ * If the `fullscreen` argument has been supplied, then
+ * if it is true, the fullscreen mode gets turned on,
+ * if it is false or null, the fullscreen mode gets turned off.
+ *
+ * If the `fullscreen` argument has not been supplied, the
+ * fullscreen mode is being toggled.
+ */
+(function (fullscreen) {
+ if (typeof exports === 'object' && typeof module === 'object') {
+ /*
+ * CommonJS environment
+ */
+ module.exports = fullscreen(require('../../xterm'));
+ } else if (typeof define == 'function') {
+ /*
+ * Require.js is available
+ */
+ define(['../../xterm'], fullscreen);
+ } else {
+ /*
+ * Plain browser environment
+ */
+ fullscreen(window.Terminal);
+ }
+})(function (Xterm) {
+ var exports = {};
+
+ exports.toggleFullScreen = function (term, fullscreen) {
+ var fn;
+
+ if (typeof fullscreen == 'undefined') {
+ fn = (term.element.classList.contains('fullscreen')) ? 'remove' : 'add';
+ } else if (!fullscreen) {
+ fn = 'remove';
+ } else {
+ fn = 'add';
+ }
+
+ term.element.classList[fn]('fullscreen');
+ };
+
+ Xterm.prototype.toggleFullscreen = function (fullscreen) {
+ exports.toggleFullScreen(this, fullscreen);
+ };
+
+ return exports;
+});
--- /dev/null
+{
+ "name": "xterm.fullscreen",
+ "main": "fullscreen.js",
+ "private": true
+}
--- /dev/null
+<!doctype html>
+<html>
+ <head>
+ <link rel="stylesheet" href="../../src/xterm.css" />
+ <link rel="stylesheet" href="../../demo/style.css" />
+ <script src="../../src/xterm.js"></script>
+ <script src="linkify.js"></script>
+ <style>
+ body {
+ color: #111;
+ }
+
+ #terminal-container {
+ max-width: 900px;
+ margin: 0 auto;
+ }
+
+ #terminal-container a {
+ color: #fff;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="terminal-container"></div>
+ <script>
+ var term = new Terminal(),
+ container = document.getElementById('terminal-container');
+
+ term.open(container);
+ term.writeln('Hello, welcome to xterm.js');
+ term.writeln('');
+ term.writeln('Check it out at github.com/sourcelair/xterm.js');
+ term.linkify();
+ </script>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+(function (linkify) {
+ if (typeof exports === 'object' && typeof module === 'object') {
+ /*
+ * CommonJS environment
+ */
+ module.exports = linkify(require('../../xterm'));
+ } else if (typeof define == 'function') {
+ /*
+ * Require.js is available
+ */
+ define(['../../xterm'], linkify);
+ } else {
+ /*
+ * Plain browser environment
+ */
+ linkify(window.Terminal);
+ }
+})(function (Xterm) {
+ 'use strict';
+
+ /**
+ * This module provides methods for convertings valid URL substrings
+ * into HTML anchor elements (links), inside a terminal view.
+ *
+ * @module xterm/addons/linkify/linkify
+ */
+ var exports = {},
+ protocolClause = '(https?:\\/\\/)',
+ domainCharacterSet = '[\\da-z\\.-]+',
+ negatedDomainCharacterSet = '[^\\da-z\\.-]+',
+ domainBodyClause = '(' + domainCharacterSet + ')',
+ tldClause = '([a-z\\.]{2,6})',
+ ipClause = '((\\d{1,3}\\.){3}\\d{1,3})',
+ portClause = '(:\\d{1,5})',
+ hostClause = '((' + domainBodyClause + '\\.' + tldClause + ')|' + ipClause + ')' + portClause + '?',
+ pathClause = '(\\/[\\/\\w\\.-]*)*',
+ negatedPathCharacterSet = '[^\\/\\w\\.-]+',
+ bodyClause = hostClause + pathClause,
+ start = '(?:^|' + negatedDomainCharacterSet + ')(',
+ end = ')($|' + negatedPathCharacterSet + ')',
+ lenientUrlClause = start + protocolClause + '?' + bodyClause + end,
+ strictUrlClause = start + protocolClause + bodyClause + end,
+ lenientUrlRegex = new RegExp(lenientUrlClause),
+ strictUrlRegex = new RegExp(strictUrlClause);
+
+ /**
+ * Converts all valid URLs found in the given terminal line into
+ * hyperlinks. The terminal line can be either the HTML element itself
+ * or the index of the termina line in the children of the terminal
+ * rows container.
+ *
+ * @param {Xterm} terminal - The terminal that owns the given line.
+ * @param {number|HTMLDivElement} line - The terminal line that should get
+ * "linkified".
+ * @param {boolean} lenient - The regex type that will be used to identify links. If lenient is
+ * false, the regex requires a protocol clause. Defaults to true.
+ * @param {string} target - Sets target="" attribute with value provided to links.
+ * Default doesn't set target attribute
+ * @emits linkify
+ * @emits linkify:line
+ */
+ exports.linkifyTerminalLine = function (terminal, line, lenient, target) {
+ if (typeof line == 'number') {
+ line = terminal.rowContainer.children[line];
+ } else if (! (line instanceof HTMLDivElement)) {
+ var message = 'The "line" argument should be either a number';
+ message += ' or an HTMLDivElement';
+
+ throw new TypeError(message);
+ }
+
+ if (typeof target === 'undefined') {
+ target = '';
+ } else {
+ target = 'target="' + target + '"';
+ }
+
+ var buffer = document.createElement('span'),
+ nodes = line.childNodes;
+
+ for (var j=0; j<nodes.length; j++) {
+ var node = nodes[j],
+ match;
+
+ /**
+ * Since we cannot access the TextNode's HTML representation
+ * from the instance itself, we assign its data as textContent
+ * to a dummy buffer span, in order to retrieve the TextNode's
+ * HTML representation from the buffer's innerHTML.
+ */
+ buffer.textContent = node.data;
+
+ var nodeHTML = buffer.innerHTML;
+
+ /**
+ * Apply function only on TextNodes
+ */
+ if (node.nodeType != node.TEXT_NODE) {
+ continue;
+ }
+
+ var url = exports.findLinkMatch(node.data, lenient);
+
+ if (!url) {
+ continue;
+ }
+
+ var startsWithProtocol = new RegExp('^' + protocolClause),
+ urlHasProtocol = url.match(startsWithProtocol),
+ href = (urlHasProtocol) ? url : 'http://' + url,
+ link = '<a href="' + href + '" ' + target + '>' + url + '</a>',
+ newHTML = nodeHTML.replace(url, link);
+
+ line.innerHTML = line.innerHTML.replace(nodeHTML, newHTML);
+ }
+
+ /**
+ * This event gets emitted when conversion of all URL susbtrings
+ * to HTML anchor elements (links) has finished, for a specific
+ * line of the current Xterm instance.
+ *
+ * @event linkify:line
+ */
+ terminal.emit('linkify:line', line);
+ };
+
+ /**
+ * Finds a link within a block of text.
+ *
+ * @param {string} text - The text to search .
+ * @param {boolean} lenient - Whether to use the lenient search.
+ * @return {string} A URL.
+ */
+ exports.findLinkMatch = function (text, lenient) {
+ var match = text.match(lenient ? lenientUrlRegex : strictUrlRegex);
+ if (!match || match.length === 0) {
+ return null;
+ }
+ return match[1];
+ }
+
+ /**
+ * Converts all valid URLs found in the terminal view into hyperlinks.
+ *
+ * @param {Xterm} terminal - The terminal that should get "linkified".
+ * @param {boolean} lenient - The regex type that will be used to identify links. If lenient is
+ * false, the regex requires a protocol clause. Defaults to true.
+ * @param {string} target - Sets target="" attribute with value provided to links.
+ * Default doesn't set target attribute
+ * @emits linkify
+ * @emits linkify:line
+ */
+ exports.linkify = function (terminal, lenient, target) {
+ var rows = terminal.rowContainer.children;
+
+ lenient = (typeof lenient == "boolean") ? lenient : true;
+ for (var i=0; i<rows.length; i++) {
+ var line = rows[i];
+
+ exports.linkifyTerminalLine(terminal, line, lenient, target);
+ }
+
+ /**
+ * This event gets emitted when conversion of all URL substrings to
+ * HTML anchor elements (links) has finished for the current Xterm
+ * instance's view.
+ *
+ * @event linkify
+ */
+ terminal.emit('linkify');
+ };
+
+ /**
+ * Extend Xterm prototype.
+ */
+
+ /**
+ * Converts all valid URLs found in the current terminal linte into
+ * hyperlinks.
+ *
+ * @memberof Xterm
+ * @param {number|HTMLDivElement} line - The terminal line that should get
+ * "linkified".
+ * @param {boolean} lenient - The regex type that will be used to identify links. If lenient is
+ * false, the regex requires a protocol clause. Defaults to true.
+ * @param {string} target - Sets target="" attribute with value provided to links.
+ * Default doesn't set target attribute
+ */
+ Xterm.prototype.linkifyTerminalLine = function (line, lenient, target) {
+ return exports.linkifyTerminalLine(this, line, lenient, target);
+ };
+
+ /**
+ * Converts all valid URLs found in the current terminal into hyperlinks.
+ *
+ * @memberof Xterm
+ * @param {boolean} lenient - The regex type that will be used to identify links. If lenient is
+ * false, the regex requires a protocol clause. Defaults to true.
+ * @param {string} target - Sets target="" attribute with value provided to links.
+ * Default doesn't set target attribute
+ */
+ Xterm.prototype.linkify = function (lenient, target) {
+ return exports.linkify(this, lenient, target);
+ };
+
+ return exports;
+});
--- /dev/null
+{
+ "name": "xterm.linkify",
+ "main": "linkify.js",
+ "private": true
+}
--- /dev/null
+{
+ "name": "xterm.terminado",
+ "main": "terminado.js",
+ "private": true
+}
--- /dev/null
+/*
+ * Implements the attach method that
+ * attaches the terminal to a Terminado WebSocket stream.
+ *
+ * The bidirectional argument indicates, whether the terminal should
+ * send data to the socket as well and is true, by default.
+ */
+
+(function (attach) {
+ if (typeof exports === 'object' && typeof module === 'object') {
+ /*
+ * CommonJS environment
+ */
+ module.exports = attach(require('../../xterm'));
+ } else if (typeof define == 'function') {
+ /*
+ * Require.js is available
+ */
+ define(['../../xterm'], attach);
+ } else {
+ /*
+ * Plain browser environment
+ */
+ attach(window.Terminal);
+ }
+})(function (Xterm) {
+ 'use strict';
+
+ /**
+ * This module provides methods for attaching a terminal to a WebSocket
+ * stream.
+ *
+ * @module xterm/addons/attach/attach
+ */
+ var exports = {};
+
+ /**
+ * Attaches the given terminal to the given socket.
+ *
+ * @param {Xterm} term - The terminal to be attached to the given socket.
+ * @param {WebSocket} socket - The socket to attach the current terminal.
+ * @param {boolean} bidirectional - Whether the terminal should send data
+ * to the socket as well.
+ * @param {boolean} buffered - Whether the rendering of incoming data
+ * should happen instantly or at a maximum
+ * frequency of 1 rendering per 10ms.
+ */
+ exports.terminadoAttach = function (term, socket, bidirectional, buffered) {
+ bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional;
+ term.socket = socket;
+
+ term._flushBuffer = function () {
+ term.write(term._attachSocketBuffer);
+ term._attachSocketBuffer = null;
+ clearTimeout(term._attachSocketBufferTimer);
+ term._attachSocketBufferTimer = null;
+ };
+
+ term._pushToBuffer = function (data) {
+ if (term._attachSocketBuffer) {
+ term._attachSocketBuffer += data;
+ } else {
+ term._attachSocketBuffer = data;
+ setTimeout(term._flushBuffer, 10);
+ }
+ };
+
+ term._getMessage = function (ev) {
+ var data = JSON.parse(ev.data)
+ if( data[0] == "stdout" ) {
+ if (buffered) {
+ term._pushToBuffer(data[1]);
+ } else {
+ term.write(data[1]);
+ }
+ }
+ };
+
+ term._sendData = function (data) {
+ socket.send(JSON.stringify(['stdin', data]));
+ };
+
+ term._setSize = function (size) {
+ socket.send(JSON.stringify(['set_size', size.rows, size.cols]));
+ };
+
+ socket.addEventListener('message', term._getMessage);
+
+ if (bidirectional) {
+ term.on('data', term._sendData);
+ }
+ term.on('resize', term._setSize);
+
+ socket.addEventListener('close', term.terminadoDetach.bind(term, socket));
+ socket.addEventListener('error', term.terminadoDetach.bind(term, socket));
+ };
+
+ /**
+ * Detaches the given terminal from the given socket
+ *
+ * @param {Xterm} term - The terminal to be detached from the given socket.
+ * @param {WebSocket} socket - The socket from which to detach the current
+ * terminal.
+ */
+ exports.terminadoDetach = function (term, socket) {
+ term.off('data', term._sendData);
+
+ socket = (typeof socket == 'undefined') ? term.socket : socket;
+
+ if (socket) {
+ socket.removeEventListener('message', term._getMessage);
+ }
+
+ delete term.socket;
+ };
+
+ /**
+ * Attaches the current terminal to the given socket
+ *
+ * @param {WebSocket} socket - The socket to attach the current terminal.
+ * @param {boolean} bidirectional - Whether the terminal should send data
+ * to the socket as well.
+ * @param {boolean} buffered - Whether the rendering of incoming data
+ * should happen instantly or at a maximum
+ * frequency of 1 rendering per 10ms.
+ */
+ Xterm.prototype.terminadoAttach = function (socket, bidirectional, buffered) {
+ return exports.terminadoAttach(this, socket, bidirectional, buffered);
+ };
+
+ /**
+ * Detaches the current terminal from the given socket.
+ *
+ * @param {WebSocket} socket - The socket from which to detach the current
+ * terminal.
+ */
+ Xterm.prototype.terminadoDetach = function (socket) {
+ return exports.terminadoDetach(this, socket);
+ };
+
+ return exports;
+});
--- /dev/null
+var assert = require('chai').assert;
+var Terminal = require('../../xterm');
+var linkify = require('../../addons/linkify/linkify');
+
+describe('linkify addon', function () {
+ var xterm;
+
+ describe('API', function () {
+ it('should define Terminal.prototype.linkify', function () {
+ assert.isDefined(Terminal.prototype.linkify);
+ });
+ it('should define Terminal.prototype.linkifyTerminalLine', function () {
+ assert.isDefined(Terminal.prototype.linkifyTerminalLine);
+ });
+ });
+
+ describe('findUrlMatchOnLine', function () {
+ describe('strict regex', function () {
+ it('should match when the entire text is a match', function () {
+ assert.equal(linkify.findLinkMatch('http://github.com', false), 'http://github.com');
+ assert.equal(linkify.findLinkMatch('http://127.0.0.1', false), 'http://127.0.0.1');
+ });
+ it('should match simple domains', function () {
+ assert.equal(linkify.findLinkMatch('foo http://github.com bar', false), 'http://github.com');
+ assert.equal(linkify.findLinkMatch('foo http://www.github.com bar', false), 'http://www.github.com');
+ assert.equal(linkify.findLinkMatch('foo https://github.com bar', false), 'https://github.com');
+ assert.equal(linkify.findLinkMatch('foo https://www.github.com bar', false), 'https://www.github.com');
+ });
+ it('should match web addresses with alpha paths', function () {
+ assert.equal(linkify.findLinkMatch('foo http://github.com/a/b/c bar', false), 'http://github.com/a/b/c');
+ assert.equal(linkify.findLinkMatch('foo http://www.github.com/a/b/c bar', false), 'http://www.github.com/a/b/c');
+ });
+ it('should not include whitespace surrounding a match', function () {
+ assert.equal(linkify.findLinkMatch(' http://github.com', false), 'http://github.com');
+ assert.equal(linkify.findLinkMatch('http://github.com ', false), 'http://github.com');
+ assert.equal(linkify.findLinkMatch(' http://github.com ', false), 'http://github.com');
+ });
+ it('should match IP addresses', function () {
+ assert.equal(linkify.findLinkMatch('foo http://127.0.0.1 bar', false), 'http://127.0.0.1');
+ assert.equal(linkify.findLinkMatch('foo https://127.0.0.1 bar', false), 'https://127.0.0.1');
+ });
+ it('should match ports on both domains and IP addresses', function () {
+ assert.equal(linkify.findLinkMatch('foo http://127.0.0.1:8080 bar', false), 'http://127.0.0.1:8080');
+ assert.equal(linkify.findLinkMatch('foo http://www.github.com:8080 bar', false), 'http://www.github.com:8080');
+ });
+ });
+ });
+});
--- /dev/null
+var assert = require('chai').assert;
+var Terminal = require('../../xterm');
+
+describe('xterm.js addons', function() {
+ it('should load addons with Terminal.loadAddon', function () {
+ Terminal.loadAddon('attach');
+ // Test that addon was loaded successfully
+ assert.equal(typeof Terminal.prototype.attach, 'function');
+ });
+});
--- /dev/null
+var assert = require('chai').assert;
+var Terminal = require('../xterm');
+var Clipboard = require('../handlers/Clipboard');
+
+
+describe('evaluateCopiedTextProcessing', function () {
+ it('should strip trailing whitespaces and replace nbsps with spaces', function () {
+ var nonBreakingSpace = String.fromCharCode(160),
+ copiedText = 'echo' + nonBreakingSpace + 'hello' + nonBreakingSpace,
+ processedText = Clipboard.prepareTextForClipboard(copiedText);
+
+ // No trailing spaces
+ assert.equal(processedText.match(/\s+$/), null);
+
+ // No non-breaking space
+ assert.equal(processedText.indexOf(nonBreakingSpace), -1);
+ });
+});
--- /dev/null
+var assert = require('chai').assert;
+var Terminal = require('../xterm');
+
+describe('CompositionHelper', function () {
+ var terminal;
+ var compositionHelper;
+ var compositionView;
+ var textarea;
+ var handledText;
+
+ beforeEach(function () {
+ compositionView = {
+ classList: {
+ add: function () {},
+ remove: function () {},
+ },
+ getBoundingClientRect: function () {
+ return { width: 0 };
+ },
+ style: {
+ left: 0,
+ top: 0
+ },
+ textContent: ''
+ };
+ textarea = {
+ value: '',
+ style: {
+ left: 0,
+ top: 0
+ }
+ };
+ terminal = {
+ element: {
+ querySelector: function () {
+ return { offsetLeft: 0, offsetTop: 0 };
+ }
+ },
+ handler: function (text) {
+ handledText += text;
+ }
+ };
+ handledText = '';
+ compositionHelper = new Terminal.CompositionHelper(textarea, compositionView, terminal);
+ });
+
+ describe('Public API', function () {
+ it('should define CompositionHelper.prototype.compositionstart', function () {
+ assert.isDefined(Terminal.CompositionHelper.prototype.compositionstart);
+ });
+ it('should define CompositionHelper.prototype.compositionupdate', function () {
+ assert.isDefined(Terminal.CompositionHelper.prototype.compositionupdate);
+ });
+ it('should define CompositionHelper.prototype.compositionend', function () {
+ assert.isDefined(Terminal.CompositionHelper.prototype.compositionend);
+ });
+ it('should define CompositionHelper.prototype.finalizeComposition', function () {
+ assert.isDefined(Terminal.CompositionHelper.prototype.finalizeComposition);
+ });
+ it('should define CompositionHelper.prototype.handleAnyTextareaChanges', function () {
+ assert.isDefined(Terminal.CompositionHelper.prototype.handleAnyTextareaChanges);
+ });
+ it('should define CompositionHelper.prototype.updateCompositionElements', function () {
+ assert.isDefined(Terminal.CompositionHelper.prototype.updateCompositionElements);
+ });
+ it('should define CompositionHelper.isComposing', function () {
+ assert.isDefined(compositionHelper.isComposing);
+ });
+ it('should define CompositionHelper.isSendingComposition', function () {
+ assert.isDefined(compositionHelper.isSendingComposition);
+ });
+ });
+
+ describe('Input', function () {
+ it('Should insert simple characters', function (done) {
+ // First character 'ㅇ'
+ compositionHelper.compositionstart();
+ compositionHelper.compositionupdate({ data: 'ㅇ' });
+ textarea.value = 'ㅇ';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionend();
+ setTimeout(function() { // wait for any textarea updates
+ assert.equal(handledText, 'ㅇ');
+ // Second character 'ㅇ'
+ compositionHelper.compositionstart();
+ compositionHelper.compositionupdate({ data: 'ㅇ' });
+ textarea.value = 'ㅇㅇ';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionend();
+ setTimeout(function() { // wait for any textarea updates
+ assert.equal(handledText, 'ㅇㅇ');
+ done();
+ }, 0);
+ }, 0);
+ }, 0);
+ }, 0);
+ });
+
+ it('Should insert complex characters', function (done) {
+ // First character '앙'
+ compositionHelper.compositionstart();
+ compositionHelper.compositionupdate({ data: 'ㅇ' });
+ textarea.value = 'ㅇ';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionupdate({ data: '아' });
+ textarea.value = '아';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionupdate({ data: '앙' });
+ textarea.value = '앙';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionend();
+ setTimeout(function() { // wait for any textarea updates
+ assert.equal(handledText, '앙');
+ // Second character '앙'
+ compositionHelper.compositionstart();
+ compositionHelper.compositionupdate({ data: 'ㅇ' });
+ textarea.value = '앙ㅇ';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionupdate({ data: '아' });
+ textarea.value = '앙아';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionupdate({ data: '앙' });
+ textarea.value = '앙앙';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionend();
+ setTimeout(function() { // wait for any textarea updates
+ assert.equal(handledText, '앙앙');
+ done();
+ }, 0);
+ }, 0);
+ }, 0);
+ }, 0);
+ }, 0);
+ }, 0);
+ }, 0);
+ }, 0);
+ });
+
+ it('Should insert complex characters that change with following character', function (done) {
+ // First character '아'
+ compositionHelper.compositionstart();
+ compositionHelper.compositionupdate({ data: 'ㅇ' });
+ textarea.value = 'ㅇ';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionupdate({ data: '아' });
+ textarea.value = '아';
+ setTimeout(function() { // wait for any textarea updates
+ // Start second character '아' in first character
+ compositionHelper.compositionupdate({ data: '앙' });
+ textarea.value = '앙';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionend();
+ compositionHelper.compositionstart();
+ compositionHelper.compositionupdate({ data: '아' });
+ textarea.value = '아아'
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionend();
+ setTimeout(function() { // wait for any textarea updates
+ assert.equal(handledText, '아아');
+ done();
+ }, 0);
+ }, 0);
+ }, 0);
+ }, 0);
+ }, 0);
+ });
+
+ it('Should insert multi-characters compositions', function (done) {
+ // First character 'だ'
+ compositionHelper.compositionstart();
+ compositionHelper.compositionupdate({ data: 'd' });
+ textarea.value = 'd';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionupdate({ data: 'だ' });
+ textarea.value = 'だ';
+ setTimeout(function() { // wait for any textarea updates
+ // Second character 'あ'
+ compositionHelper.compositionupdate({ data: 'だあ' });
+ textarea.value = 'だあ';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionend();
+ setTimeout(function() { // wait for any textarea updates
+ assert.equal(handledText, 'だあ');
+ done();
+ }, 0);
+ }, 0);
+ }, 0);
+ }, 0);
+ });
+
+ it('Should insert multi-character compositions that are converted to other characters with the same length', function (done) {
+ // First character 'だ'
+ compositionHelper.compositionstart();
+ compositionHelper.compositionupdate({ data: 'd' });
+ textarea.value = 'd';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionupdate({ data: 'だ' });
+ textarea.value = 'だ';
+ setTimeout(function() { // wait for any textarea updates
+ // Second character 'ー'
+ compositionHelper.compositionupdate({ data: 'だー' });
+ textarea.value = 'だー';
+ setTimeout(function() { // wait for any textarea updates
+ // Convert to katakana 'ダー'
+ compositionHelper.compositionupdate({ data: 'ダー' });
+ textarea.value = 'ダー';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionend();
+ setTimeout(function() { // wait for any textarea updates
+ assert.equal(handledText, 'ダー');
+ done();
+ }, 0);
+ }, 0);
+ }, 0);
+ }, 0);
+ }, 0);
+ })
+
+ it('Should insert multi-character compositions that are converted to other characters with different lengths', function (done) {
+ // First character 'い'
+ compositionHelper.compositionstart();
+ compositionHelper.compositionupdate({ data: 'い' });
+ textarea.value = 'い';
+ setTimeout(function() { // wait for any textarea updates
+ // Second character 'ま'
+ compositionHelper.compositionupdate({ data: 'いm' });
+ textarea.value = 'いm';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionupdate({ data: 'いま' });
+ textarea.value = 'いま';
+ setTimeout(function() { // wait for any textarea updates
+ // Convert to kanji '今'
+ compositionHelper.compositionupdate({ data: '今' });
+ textarea.value = '今';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionend();
+ setTimeout(function() { // wait for any textarea updates
+ assert.equal(handledText, '今');
+ done();
+ }, 0);
+ }, 0);
+ }, 0);
+ }, 0);
+ }, 0);
+ });
+
+ it('Should insert non-composition characters input immediately after composition characters', function (done) {
+ // First character 'ㅇ'
+ compositionHelper.compositionstart();
+ compositionHelper.compositionupdate({ data: 'ㅇ' });
+ textarea.value = 'ㅇ';
+ setTimeout(function() { // wait for any textarea updates
+ compositionHelper.compositionend();
+ // Second character '1' (a non-composition character)
+ textarea.value = 'ㅇ1';
+ setTimeout(function() { // wait for any textarea updates
+ assert.equal(handledText, 'ㅇ1');
+ done();
+ }, 0);
+ }, 0);
+ });
+ });
+});
--- /dev/null
+var glob = require('glob');
+var fs = require('fs');
+var pty = require('pty.js');
+var sleep = require('sleep');
+var Terminal = require('../xterm');
+
+var CONSOLE_LOG = console.log;
+
+// expect files need terminal at 80x25!
+var COLS = 80;
+var ROWS = 25;
+
+/** some helpers for pty interaction */
+// we need a pty in between to get the termios decorations
+// for the basic test cases a raw pty device is enough
+var primitive_pty = pty.native.open(COLS, ROWS);
+
+// fake sychronous pty write - read
+// we just pipe the data from slave to master as a child program would do
+// pty.js opens pipe fds with O_NONBLOCK
+// just wait 10ms instead of setting fds to blocking mode
+function pty_write_read(s) {
+ fs.writeSync(primitive_pty.slave, s);
+ sleep.usleep(10000);
+ var b = Buffer(64000);
+ var bytes = fs.readSync(primitive_pty.master, b, 0, 64000);
+ return b.toString('utf8', 0, bytes);
+}
+
+// make sure raw pty is at x=0 and has no pending data
+function pty_reset() {
+ pty_write_read('\r\n');
+}
+
+/* debug helpers */
+// generate colorful noisy output to compare xterm and emulator cell states
+function formatError(in_, out_, expected) {
+ function addLineNumber(start, color) {
+ var counter = start || 0;
+ return function(s) {
+ counter += 1;
+ return '\x1b[33m' + (' ' + counter).slice(-2) + color + s;
+ }
+ }
+ var line80 = '12345678901234567890123456789012345678901234567890123456789012345678901234567890';
+ var s = '';
+ s += '\n\x1b[34m' + JSON.stringify(in_);
+ s += '\n\x1b[33m ' + line80 + '\n';
+ s += out_.split('\n').map(addLineNumber(0, '\x1b[31m')).join('\n');
+ s += '\n\x1b[33m ' + line80 + '\n';
+ s += expected.split('\n').map(addLineNumber(0, '\x1b[32m')).join('\n');
+ return s;
+}
+
+// simple debug output of terminal cells
+function terminalToString(term) {
+ var result = '';
+ var line_s = '';
+ for (var line=0; line<term.rows; ++line) {
+ line_s = '';
+ for (var cell=0; cell<term.cols; ++cell) {
+ line_s += term.lines[line][cell][1];
+ }
+ // rtrim empty cells as xterm does
+ line_s = line_s.replace(/\s+$/, '');
+ result += line_s;
+ result += '\n';
+ }
+ return result;
+}
+
+/** tests */
+describe('xterm output comparison', function() {
+ var xterm;
+
+ beforeEach(function () {
+ xterm = new Terminal(COLS, ROWS);
+ xterm.refresh = function() {};
+ });
+
+ // omit stack trace for escape sequence files
+ Error.stackTraceLimit = 0;
+ var files = glob.sync('**/escape_sequence_files/*.in');
+ // only successful tests for now
+ var successful = [0, 2, 6, 12, 13, 18, 20, 22, 27, 28];
+ console.log(files);
+ for (var a in successful) {
+ var i = successful[a];
+ (function(filename){
+ it(filename.split('/').slice(-1)[0], function () {
+ pty_reset();
+ var in_file = fs.readFileSync(filename, 'utf8');
+ var from_pty = pty_write_read(in_file);
+ // uncomment this to get log from terminal
+ console.log = function(){};
+ xterm.write(from_pty);
+ var from_emulator = terminalToString(xterm);
+ console.log = CONSOLE_LOG;
+ var expected = fs.readFileSync(filename.split('.')[0] + '.text', 'utf8');
+ if (from_emulator != expected) {
+ // uncomment to get noisy output
+ //throw new Error(formatError(in_file, from_emulator, expected));
+ throw new Error('mismatch');
+ }
+ });
+ })(files[i]);
+ }
+});
+
--- /dev/null
+All tests are made for 80x25 terminal. Make sure to run tests with 80x25.
+
+Create .text files from xterm (expected output)
+- open xterm
+- resize xterm to 80x25
+- run `python run_tests.py`
+- copy & paste whole window output into editor
+- add 26th empty line (due to line handling in toString) - not a bug, a feature ;)
+- advance to next test with ^D
+
+
+Known problems
+##############
+
+
+t0031-HBP:
+ - no documentation at all about CSIj found - skipping
+
+t0050-ICH:
+ - bug in xterm? (cant ICH last real char, always sticks to last col)
+ - text used from https://github.com/MarkLodato/vt100-parser/blob/master/test/t0050-ICH.text
--- /dev/null
+ !"#$%&'()*+,-./
+0123456789:;<=>?
+@ABCDEFGHIJKLMNO
+PQRSTUVWXYZ[\]^_
+`abcdefghijklmno
+pqrstuvwxyz{|}~
--- /dev/null
+ !"#$%&'()*+,-./
+0123456789:;<=>?
+@ABCDEFGHIJKLMNO
+PQRSTUVWXYZ[\]^_
+`abcdefghijklmno
+pqrstuvwxyz{|}~
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+
+!
+"
+#
+$
+%
+&
+'
+(
+)
+*
++
+,
+-
+.
+/
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+:
+;
+<
+=
+>
+?
+@
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+[
+\
+]
+^
+_
+`
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y
+z
+{
+|
+}
+~
--- /dev/null
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y
+z
+{
+|
+}
+~
+
--- /dev/null
+abcdefghijklmnopqrstuvwxyz0123456789
\ No newline at end of file
--- /dev/null
+abcdefghijklmnopqrstuvwxyz0123456789
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+a
+ab
+abc
+abcd
+abcde
+abcdef
+abcdefg
+abcdefgh
+abcdefghi
+abcdefghij
+abcdefghijk
+abcdefghijkl
+abcdefghijklm
+abcdefghijklmn
+abcdefghijklmno
+abcdefghijklmnop
+abcdefghijklmnopq
+abcdefghijklmnopqr
+abcdefghijklmnopqrs
+abcdefghijklmnopqrst
+abcdefghijklmnopqrstu
+abcdefghijklmnopqrstuv
+abcdefghijklmnopqrstuvw
+abcdefghijklmnopqrstuvwx
+abcdefghijklmnopqrstuvwxy
+abcdefghijklmnopqrstuvwxyz
+abcdefghijklmnopqrstuvwxyzA
+abcdefghijklmnopqrstuvwxyzAB
+abcdefghijklmnopqrstuvwxyzABC
+abcdefghijklmnopqrstuvwxyzABCD
+abcdefghijklmnopqrstuvwxyzABCDE
+abcdefghijklmnopqrstuvwxyzABCDEF
+abcdefghijklmnopqrstuvwxyzABCDEFG
+abcdefghijklmnopqrstuvwxyzABCDEFGH
+abcdefghijklmnopqrstuvwxyzABCDEFGHI
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJ
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJK
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLM
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQ
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQR
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345678
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890a
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890ab
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abc
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcd
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdef
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghij
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijk
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijkl
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmn
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqr
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqrs
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqrst
--- /dev/null
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890a
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890ab
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abc
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcd
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdef
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghij
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijk
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijkl
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmn
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+r
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+rs
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+rst
+
--- /dev/null
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
--- /dev/null
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
--- /dev/null
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y
+z
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+0
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
--- /dev/null
+7
+8
+9
+0
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+
--- /dev/null
+1\rx
+ 2\rx
+ 3\rx
+ 4\rx
+ 5\rx
+ 6\rx
+ 7\rx
\ No newline at end of file
--- /dev/null
+x
+x2
+x 3
+x 4
+x 5
+x 6
+x 7
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
+ b\ra\r
--- /dev/null
+a b
+a b
+a b
+a b
+a b
+a b
+a b
+a b
+a b
+a b
+a b
+a b
+a b
+a b
+a b
+a b
+a b
+a b
+a b
+a b
+
+a
+
+ab
+
--- /dev/null
+a\eDb\eDc\eDd\eDe\eDf\eDg\eDh\eDi\eDj\eDk\eDl\eDm\eDn\eDo\eDp\eDq\eDr\eDs\eDt\eDu\eDv\eDw\eDx\eDy\eDz\eDA\eDB\eDC\eDD\eDE\eDF\eDG\eDH\eDI\eDJ\eDK\eDL\eDM\eDN\eDO\eDP\eDQ\eDR\eDS\eDT\eDU\eDV\eDW\eDX\eDY\eDZ\eD0\eD1\eD2\eD3\eD4\eD5\eD6\eD7\eD8\eD9\eD0\eDa\eDb\eDc\eDd\eDe\eDf\eDg\eDh\eDi\eDj\eDk\eDl\eDm\eDn\eDo\eDp\eDq\eDr\eDs\eDt
--- /dev/null
+ 7
+ 8
+ 9
+ 0
+ a
+ b
+ c
+ d
+ e
+ f
+ g
+ h
+ i
+ j
+ k
+ l
+ m
+ n
+ o
+ p
+ q
+ r
+ s
+ t
+
--- /dev/null
+0 space:
+1 space:
+2 space:
+3 space:
+70 space:
+71 space:
+72 space:
+73 space:
--- /dev/null
+0 space:
+1 space:
+2 space:
+3 space:
+70 space:
+71 space:
+72 space:
+
+73 space:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+abcdefghijklmnopqrstuvwxyz\b\b\b\b\b\b!
+abc\b\b\b\b\b\b@
+\b#
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\b\b\b\b\b\b$
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\b\b\b\b\b\b%
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqr\b\b\b\b\b\b^
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqrs\b\b\b\b\b\b&
--- /dev/null
+abcdefghijklmnopqrst!vwxyz
+@bc
+#
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghij$lmnop
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghij%lmnopq
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+^
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+&s
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+a\eEab\eEabc\eEabcd\eEabcde\eEabcdef\eEabcdefg\eEabcdefgh\eEabcdefghi\eEabcdefghij\eEabcdefghijk\eEabcdefghijkl\eEabcdefghijklm\eEabcdefghijklmn\eEabcdefghijklmno\eEabcdefghijklmnop\eEabcdefghijklmnopq\eEabcdefghijklmnopqr\eEabcdefghijklmnopqrs\eEabcdefghijklmnopqrst\eEabcdefghijklmnopqrstu\eEabcdefghijklmnopqrstuv\eEabcdefghijklmnopqrstuvw\eEabcdefghijklmnopqrstuvwx\eEabcdefghijklmnopqrstuvwxy\eEabcdefghijklmnopqrstuvwxyz\eEabcdefghijklmnopqrstuvwxyzA\eEabcdefghijklmnopqrstuvwxyzAB\eEabcdefghijklmnopqrstuvwxyzABC\eEabcdefghijklmnopqrstuvwxyzABCD\eEabcdefghijklmnopqrstuvwxyzABCDE\eEabcdefghijklmnopqrstuvwxyzABCDEF\eEabcdefghijklmnopqrstuvwxyzABCDEFG\eEabcdefghijklmnopqrstuvwxyzABCDEFGH\eEabcdefghijklmnopqrstuvwxyzABCDEFGHI\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJ\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJK\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKL\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLM\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQ\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQR\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345678\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890a\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890ab\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abc\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcd\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdef\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghij\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijk\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijkl\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmn\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqr\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqrs\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqrst
--- /dev/null
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890a
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890ab
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abc
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcd
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdef
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghij
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijk
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijkl
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmn
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+r
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+rs
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+rst
+
--- /dev/null
+a
+b
+c
+d\eMe\eMf\eMg
+h
+i
+j....................................................................k\eMl\eMm\eMn
+
+
+
--- /dev/null
+a g n
+h f m
+ie l
+j....................................................................k
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+And the third.\r
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+This should be the last line.\r
+This one should be lost.\r
+This one's a goner, too.\r\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eMThis is second line.\r\eMThis should be the first line.\r
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+This should be the first line.
+This is second line.
+And the third.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+This should be the last line.
+This one should be lost.
--- /dev/null
+a\vb\vc\vd\ve\vf\vg\vh\vi\vj\vk\vl\vm\vn\vo\vp\vq\vr\vs\vt\vu\vv\vw\vx\vy\vz\vA\vB\vC\vD\vE\vF\vG\vH\vI\vJ\vK\vL\vM\vN\vO\vP\vQ\vR\vS\vT\vU\vV\vW\vX\vY\vZ\v0\v1\v2\v3\v4\v5\v6\v7\v8\v9\v0\va\vb\vc\vd\ve\vf\vg\vh\vi\vj\vk\vl\vm\vn\vo\vp\vq\vr\vs\vt\r\v
\ No newline at end of file
--- /dev/null
+ 7
+ 8
+ 9
+ 0
+ a
+ b
+ c
+ d
+ e
+ f
+ g
+ h
+ i
+ j
+ k
+ l
+ m
+ n
+ o
+ p
+ q
+ r
+ s
+ t
+
--- /dev/null
+a\fb\fc\fd\fe\ff\fg\fh\fi\fj\fk\fl\fm\fn\fo\fp\fq\fr\fs\ft\fu\fv\fw\fx\fy\fz\fA\fB\fC\fD\fE\fF\fG\fH\fI\fJ\fK\fL\fM\fN\fO\fP\fQ\fR\fS\fT\fU\fV\fW\fX\fY\fZ\f0\f1\f2\f3\f4\f5\f6\f7\f8\f9\f0\fa\fb\fc\fd\fe\ff\fg\fh\fi\fj\fk\fl\fm\fn\fo\fp\fq\fr\fs\ft\r\f
--- /dev/null
+ 8
+ 9
+ 0
+ a
+ b
+ c
+ d
+ e
+ f
+ g
+ h
+ i
+ j
+ k
+ l
+ m
+ n
+ o
+ p
+ q
+ r
+ s
+ t
+
+
--- /dev/null
+abcd\18Defgh\r
+abcd\e\18Defgh\r
+abcd\e!\18Defgh\r
+abcd\e!*\18Defgh\r
+abcd\e[\18Defgh\r
+abcd\e[!\18Defgh\r
+abcd\e[2\18Defgh\r
+abcd\e[*2;\18Defgh\r
--- /dev/null
+abcdDefgh
+abcdDefgh
+abcdDefgh
+abcdDefgh
+abcdDefgh
+abcdDefgh
+abcdDefgh
+abcdDefgh
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+abcd\1aDefgh\r
+abcd\e\1aDefgh\r
+abcd\e!\1aDefgh\r
+abcd\e!*\1aDefgh\r
+abcd\e[\1aDefgh\r
+abcd\e[!\1aDefgh\r
+abcd\e[2\1aDefgh\r
+abcd\e[*2;\1aDefgh\r
--- /dev/null
+abcdDefgh
+abcdDefgh
+abcdDefgh
+abcdDefgh
+abcdDefgh
+abcdDefgh
+abcdDefgh
+abcdDefgh
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+Hello\e[SGoodbye
+
+Up\e[3SDown
+x
+\e[2S
+-----------------------------------------------------------------------------\e[Sx
+------------------------------------------------------------------------------\e[Sx
+-------------------------------------------------------------------------------\e[Sx
+--------------------------------------------------------------------------------\e[Sx
+---------------------------------------------------------------------------------\e[Sx
+.............................................................................\e[S\bx
+..............................................................................\e[S\bx
+...............................................................................\e[S\bx
+................................................................................\e[S\bx
+.................................................................................\e[S\bx
+\e[30S
+The End.
--- /dev/null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+The End.
+
+
+
+
+
--- /dev/null
+A
+ B
+ C
+ D
+ E
+ F
+ G
+ H
+ I
+ J
+ K
+ L
+ M
+ N
+ O
+ P
+ Q
+ R
+ S
+ T
+ U
+ V
+ W
+ X\e[3S
+a
+ b
+ c
+ d
+ e\e[3T
+ f
+ g
+ h
+------------------------------------------------------------------------------\e[T1
+
+
+-------------------------------------------------------------------------------\e[T2
+
+
+--------------------------------------------------------------------------------\e[T3
+
+
+---------------------------------------------------------------------------------\e[T4
+
+
+..............................................................................\e[T\b5
+
+
+...............................................................................\e[T\b6
+
+
+................................................................................\e[T\b7
+
+
+.................................................................................\e[T\b8
--- /dev/null
+
+
+a
+ b
+ f
+ g
+ h 1
+
+ 2
+
+
+3
+
+
+-4------------------------------------------------------------------------------
+
+ 5
+
+ 6
+
+ 7
+
+
+8...............................................................................
+
--- /dev/null
+abcdefg\e[Chijkl
+abcdefg\e[10Chijkl
+abcdefg\e[10;3Chijkl
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno\e[C@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\e[C@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\e[C@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqr\e[C@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[3C@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[4C@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[5C@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[6C@
+\e[79Cx
+\e[80Cx
+abcd\e[10C
--- /dev/null
+abcdefg hijkl
+abcdefg hijkl
+abcdefg hijkl
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno @
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+r @
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
+ x
+ x
+abcd
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+abcdefg\e[D!@
+abcdefg\e[10D!@
+abcdefg\e[2;3D!@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno\e[D@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\e[D@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\e[D@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqr\e[D@
+\e[Dx
--- /dev/null
+abcdef!@
+!@cdefg
+abcde!@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmn@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno@q
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+@
+x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+a
+b
+c
+d\e[Ae\e[Af\e[Ag
+h
+i
+j....................................................................k\e[Al\e[Am\e[An
+
+
+
+
+
+
+
+
+
+
+
+\e[0A0\e[1A1\e[2A2\e[3;5A3
+
+
+
+
+
+
--- /dev/null
+a g n
+h f m
+ie l
+j....................................................................k
+
+ 3
+
+
+ 2
+
+ 1
+0
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+This is the first line.\r
+This is the second line.\r
+And the third.\r
+This line should be deleted.\r
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Penultimate line.\r
+This should be the last line.\r\e[36AI have gone up all the way...\r
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+I have gone up all the way...
+This line should be deleted.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Penultimate line.
+This should be the last line.
--- /dev/null
+a\r
+b\r
+c\r
+d\r
+e\r
+f\r
+g\r
+h\r
+i\r
+j\r
+k\r
+l\r
+m\r
+n\r
+o\r
+p\r
+q\r
+r\r
+s\r
+t\r
+u\r
+v\r
+w\r
+x\e[23A0\e[B1\e[0B2\e[1B3\e[2B4\e[3;5B5\e[100BBottom line.\r\e[8A\e[78CA\e[BB\e[BC\e[BD\e[BE\r\e[6B\r
--- /dev/null
+b 1
+c 2
+d 3
+e
+f 4
+g
+h
+i 5
+j
+k
+l
+m
+n
+o
+p
+q A
+r B
+s C
+t D
+u E
+v
+w
+x
+ Bottom line.
+
--- /dev/null
+\e[Ha\e[2;3Hb\e[;4Hc\e[10;10Hd\e[5He\e[40;16Hf\e[20;100Hg\e[100;200H
--- /dev/null
+ b
+
+
+e
+
+
+
+
+ d
+
+
+
+
+
+
+
+
+
+ g
+
+
+
+
+ f
+
--- /dev/null
+abc\e[Edef\e[5Eghi\r\r
+-------------------------------------------------------------------------abcdefg\e[Ehij\e[100Elast line\r
--- /dev/null
+def
+
+
+
+
+ghi
+-------------------------------------------------------------------------abcdefg
+hij
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+last line
+
--- /dev/null
+erased\e[Freplacement
+
+
+line four\e[2Fline two
+
+
--- /dev/null
+replacement
+line two
+
+line four
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+abcdefg\e[ahijkl
+abcdefg\e[10ahijkl
+abcdefg\e[10;3ahijkl
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno\e[a@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\e[a@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\e[a@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqr\e[a@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[3a@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[4a@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[5a@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[6a@
+\e[79ax
+\e[80ax
+abcd\e[10a
--- /dev/null
+abcdefg hijkl
+abcdefg hijkl
+abcdefg hijkl
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno @
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+r @
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
+ x
+ x
+abcd
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+abcdefg\e[j!@
+abcdefg\e[10j!@
+abcdefg\e[2;3j!@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno\e[j@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\e[j@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\e[j@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqr\e[j@
+\e[jx
--- /dev/null
+abcdefg!@
+abcdefg!@
+abcdefg!@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
+r@
+x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+a
+b
+c
+d\e[ke\e[kf\e[kg
+h
+i
+j....................................................................k\e[kl\e[km\e[kn
+
+
+
+
+
+
+
+
+
+
+
+\e[0k0\e[1k1\e[2k2\e[3;5k3
+
+
+
+
+
+
--- /dev/null
+b
+c
+defg
+h
+i
+j....................................................................klmn
+
+
+
+
+
+
+
+
+
+
+
+0123
+
+
+
+
+
+
+
--- /dev/null
+This is the first line.\r
+This is the second line.\r
+And the third.\r
+This line should be deleted.\r
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Penultimate line.\r
+This should be the last line.\r\e[36kI have gone up all the way...\r
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+I have gone up all the way...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+a\r
+b\r
+c\r
+d\r
+e\r
+f\r
+g\r
+h\r
+i\r
+j\r
+k\r
+l\r
+m\r
+n\r
+o\r
+p\r
+q\r
+r\r
+s\r
+t\r
+u\r
+v\r
+w\r
+x\e[23A0\e[e1\e[0e2\e[1e3\e[2e4\e[3;5e5\e[100eBottom line.\r\e[8A\e[78CA\e[eB\e[eC\e[eD\e[eE\r\e[6e\r
--- /dev/null
+b 1
+c 2
+d 3
+e
+f 4
+g
+h
+i 5
+j
+k
+l
+m
+n
+o
+p
+q A
+r B
+s C
+t D
+u E
+v
+w
+x
+ Bottom line.
+
--- /dev/null
+\e[fa\e[2;3fb\e[;4fc\e[10;10fd\e[5fe\e[40;16ff\e[20;100fg\e[100;200f
--- /dev/null
+ b
+
+
+e
+
+
+
+
+ d
+
+
+
+
+
+
+
+
+
+ g
+
+
+
+
+ f
+
--- /dev/null
+x\e[5b
+\e[3b<
+abcdefg\e[3D\e[b
+abcdefg\e[3D\e[b!
+ @\e[20b
+ .\e[4b
+ ?\e[0b-
--- /dev/null
+xxxxxx
+<
+abcdefg
+abcd!fg
+ @@@@@@@@@
+@@@@@@@@@@@@
+ .
+....
+ ?
+?-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+abcdefghijklmnopqrstuvwxyz\b\b\b\b\b\e[15@
+abcdefghijklmnopqrstuvwxyz\b\b\b\b\b\e[80@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[17@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[18@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[19@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[20@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[21@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\e[5@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\e[5@
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\e[5@
+ICH at end:\e[5@
+
+abcdefghijklmnopqrstuvwxyz\b\b\b\b\b\e[15@!@#
+abcdefghijklmnopqrstuvwxyz\b\b\b\b\b\e[80@!@#
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[17@!@#
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[18@!@#
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[19@!@#
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[20@!@#
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[21@!@#
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\e[5@!@#
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\e[5@!@#
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\e[5@!@#
+ICH at end:\e[5@!@#
--- /dev/null
+abcdefghijklmnopqrstu
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567 89
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567 89
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567 8
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ01234567890abcdefghijkl
+ICH at end:
+
+abcdefghijklmnopqrstu!@# vwxyz
+abcdefghijklmnopqrstu!@#
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567!@# 89
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567!@# 89
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567!@# 8
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567!@#
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567!@#
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop!
+@#
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop!
+@#
+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW!@# XYZ01234567890abcdefghijkl
+ICH at end:!@#
+
--- /dev/null
+ab\r
+cd\r
+ef\r
+gh\r
+ij\r
+kl\r
+mn\r
+op\e[2A\e[LQR\e[3A\e[4LST\e[10B\r
+1\r
+2\r
+3\r
+4\r
+5\e[A------------------------------------------------------------------------------a\e[Lb\e[2B\r\r
+6\r
+7\r
+8\r
+9\r
+10\r
+11\r
+12\r
+13\r
+14\r
+15\e[4A\e[3L\e[100B\r
--- /dev/null
+
+ef
+gh
+ij
+QR
+kl
+mn
+op
+1
+2
+3
+b
+4------------------------------------------------------------------------------a
+5
+6
+7
+8
+9
+10
+
+
+
+11
+12
+
--- /dev/null
+a
+b
+c
+d
+e
+f
+g
+h\e[4A\e[2Mijklmnop\r
+
+
+1
+2
+3
+4\e[2A\r\e[79C\e[Mx\r
+
--- /dev/null
+a
+b
+c
+ijklmnop
+g
+h
+1
+x
+4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+abcdefghijklmnopqrstuvwxyz\e[8D>\e[2P
+abcdefghijklmnopqrstuvwxyz\e[8D>\e[2P!
+abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[80D>\e[10P!
+abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D>\e[10P!
+------------------------------------------------------------------------------\e[P?
+-------------------------------------------------------------------------------\e[P?
+-------------------------------------------------------------------------------\e[P?
+---------------------------------------------------------------------------------\e[P?
+..............................................................................\e[P
+...............................................................................\e[P
+...............................................................................\e[P
+.................................................................................\e[P
--- /dev/null
+abcdefghijklmnopqr>vwxyz
+abcdefghijklmnopqr>!wxyz
+>!mnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh
+abcdefghijklmnopqrstuvwxyz0123456789ABC>!PQRSTUVWXYZ0123456789abcdefgh
+------------------------------------------------------------------------------?
+-------------------------------------------------------------------------------?
+-------------------------------------------------------------------------------?
+--------------------------------------------------------------------------------
+-?
+..............................................................................
+...............................................................................
+...............................................................................
+................................................................................
+.
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+abcdefghijklmnopqrstuvwxyz\e[8D>\e[2X
+abcdefghijklmnopqrstuvwxyz\e[8D>\e[2X!
+abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[80D>\e[10X!
+abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D>\e[10X!
+------------------------------------------------------------------------------\e[X?
+-------------------------------------------------------------------------------\e[X?
+-------------------------------------------------------------------------------\e[X?
+---------------------------------------------------------------------------------\e[X?
+..............................................................................\e[X
+...............................................................................\e[X
+...............................................................................\e[X
+.................................................................................\e[X
--- /dev/null
+abcdefghijklmnopqr> vwxyz
+abcdefghijklmnopqr>! vwxyz
+>! lmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh
+abcdefghijklmnopqrstuvwxyz0123456789ABC>! OPQRSTUVWXYZ0123456789abcdefgh
+------------------------------------------------------------------------------?
+-------------------------------------------------------------------------------?
+-------------------------------------------------------------------------------?
+--------------------------------------------------------------------------------
+-?
+..............................................................................
+...............................................................................
+...............................................................................
+................................................................................
+.
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D><\b\e[K
+abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D><\b\e[0K
+abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D><\b\e[1K
+abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D><\b\e[2K
+abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D><\b\e[K!
+abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D><\b\e[1K!
+abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D><\b\e[2K!
+abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[K!
--- /dev/null
+abcdefghijklmnopqrstuvwxyz0123456789ABC>
+abcdefghijklmnopqrstuvwxyz0123456789ABC>
+ FGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh
+
+abcdefghijklmnopqrstuvwxyz0123456789ABC>!
+ !FGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh
+ !
+abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefg!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+a
+ab
+abc
+abcd
+abcde
+abcdef
+abcdefg
+abcdefgh
+abcdefghi
+abcdefghij
+abcdefghijk
+abcdefghijkl
+abcdefghijklm
+abcdefghijklmn
+abcdefghijklmno
+abcdefghijklmnop
+abcdefghijklmnopq
+abcdefghijklmnopqr
+abcdefghijklmnopqrs
+abcdefghijklmnopqrst
+abcdefghijklmnopqrstu
+abcdefghijklmnopqrstuv
+abcdefghijklmnopqrstuvw
+abcdefghijklmnopqrstuvwx
+abcdefghijklmnopqrstuvwxy
+abcdefghijklmnopqrstuvwxyz\e[20D\e[5A\e[J\e[10A\e[1J\e[40B
+A
+AB
+ABC
+ABCD
+ABCDE
+ABCDEF
+ABCDEFG
+ABCDEFGH
+ABCDEFGHI
+ABCDEFGHIJ
+ABCDEFGHIJK
+ABCDEFGHIJKL
+ABCDEFGHIJKLM
+ABCDEFGHIJKLMN
+ABCDEFGHIJKLMNO
+ABCDEFGHIJKLMNOP
+ABCDEFGHIJKLMNOPQ
+ABCDEFGHIJKLMNOPQR
+ABCDEFGHIJKLMNOPQRS
+ABCDEFGHIJKLMNOPQRST
+ABCDEFGHIJKLMNOPQRSTU
+ABCDEFGHIJKLMNOPQRSTUV
+ABCDEFGHIJKLMNOPQRSTUVW
+ABCDEFGHIJKLMNOPQRSTUVWX
+ABCDEFGHIJKLMNOPQRSTUVWXY\e[20D\e[2J!
+\e[30B
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\e[3Av\e[B\e[J^
+
+
+
+the end
--- /dev/null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ !
+
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaav
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa^
+
+
+
+the end
+
--- /dev/null
+a
+ab
+abc
+abcd
+abcde
+abcdef
+abcdefg
+abcdefgh
+abcdefghi
+abcdefghij
+abcdefghijk
+abcdefghijkl
+abcdefghijklm
+abcdefghijklmn
+abcdefghijklmno
+abcdefghijklmnop
+abcdefghijklmnopq
+abcdefghijklmnopqr
+abcdefghijklmnopqrs
+abcdefghijklmnopqrst
+abcdefghijklmnopqrstu
+abcdefghijklmnopqrstuv
+abcdefghijklmnopqrstuvw
+abcdefghijklmnopqrstuvwx
+abcdefghijklmnopqrstuvwxy
+abcdefghijklmnopqrstuvwxyz
+A
+AB
+ABC
+ABCD
+ABCDE
+ABCDEF
+ABCDEFG
+ABCDEFGH
+ABCDEFGHI
+ABCDEFGHIJ
+ABCDEFGHIJK
+ABCDEFGHIJKL
+ABCDEFGHIJKLM
+ABCDEFGHIJKLMN
+ABCDEFGHIJKLMNO
+ABCDEFGHIJKLMNOP
+ABCDEFGHIJKLMNOPQ
+ABCDEFGHIJKLMNOPQR
+ABCDEFGHIJKLMNOPQRS
+ABCDEFGHIJKLMNOPQRST
+ABCDEFGHIJKLMNOPQRSTU
+ABCDEFGHIJKLMNOPQRSTUV
+ABCDEFGHIJKLMNOPQRSTUVW
+ABCDEFGHIJKLMNOPQRSTUVWX
+ABCDEFGHIJKLMNOPQRSTUVWXY\e[3J
+this
+is
+the
+end
--- /dev/null
+Xterm behaves oddly with CSI 3 J. This function is supposed to clear the
+saved lines in history. Xterm does this, but a small number of lines of
+history are not cleared. The number seems to vary with how high the window is
+and how much output has recently been saved. There is no reason to simulate
+this behavior, so the expected outputs are as if the entire history was
+erased.
--- /dev/null
+ABCDEF
+ABCDEFG
+ABCDEFGH
+ABCDEFGHI
+ABCDEFGHIJ
+ABCDEFGHIJK
+ABCDEFGHIJKL
+ABCDEFGHIJKLM
+ABCDEFGHIJKLMN
+ABCDEFGHIJKLMNO
+ABCDEFGHIJKLMNOP
+ABCDEFGHIJKLMNOPQ
+ABCDEFGHIJKLMNOPQR
+ABCDEFGHIJKLMNOPQRS
+ABCDEFGHIJKLMNOPQRST
+ABCDEFGHIJKLMNOPQRSTU
+ABCDEFGHIJKLMNOPQRSTUV
+ABCDEFGHIJKLMNOPQRSTUVW
+ABCDEFGHIJKLMNOPQRSTUVWX
+ABCDEFGHIJKLMNOPQRSTUVWXY
+this
+is
+the
+end
+
--- /dev/null
+ \e7v 1\e[S\b2
+
+3\e8^
+
+
+
+ v\e7
+...\e[Sooo\e8^
+
--- /dev/null
+
+3
+
+ v
+... ^
+ ooo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+ \e[sv 1\e[S\b2
+
+3\e[u^
+
+
+
+ v\e[s
+...\e[Sooo\e[u^
+
--- /dev/null
+
+3
+
+ v
+... ^
+ ooo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+\e[3;7r1
+2
+3
+4
+5
+6
+7
+8
+9\e[78GABCDEF\e[8da
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u\e[78Gvwxyz
+\e[r\e[24d
+The end.
--- /dev/null
+1
+ 2
+ 6
+ 7
+ 8
+ 9 ABC
+DEF
+ a
+ b
+ c
+ d
+ e
+ f
+ g
+ h
+ i
+ j
+ k
+ l
+ m
+ n
+ o
+ p
+yz qrstu vwx
+The end.
--- /dev/null
+\e[3;7r1\eD2\eD3\eD4\eD5\eD6\eD7\eD8\eD9\e[78GABCDEF\e[8da\eDb\eDc\eDd\eDe\eDf\eDg\eDh\eDi\eDj\eDk\eDl\eDm\eDn\eDo\eDp\eDq\eDr\eDs\eDt\eDu\e[78Gvwxyz
+\e[r\e[24d
+The end.
--- /dev/null
+ 2
+ 6
+ 7
+ 8
+ 9 ABC
+DEF
+ a
+ b
+ c
+ d
+ e
+ f
+ g
+ h
+ i
+ j
+ k
+ l
+ m
+ n
+ o
+ p
+ q
+The end. rstu vwx
+
--- /dev/null
+\e[3;7r1\eE2\eE3\eE4\eE5\eE6\eE7\eE8\eE9\e[8da\eEb\eEc\eEd\eEe\eEf\eEg\eEh\eEi\eEj\eEk\eEl\eEm\eEn\eEo\eEp\eEq\eEr\eEs\eEt\eEu\e[r\e[24d
+The end.
--- /dev/null
+2
+5
+6
+7
+8
+9
+ a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+The end.
+
--- /dev/null
+TOP 1\r
+TOP 2\r
+TOP 3\r
+TOP 4\r
+TOP 5\r
+TOP 6 - GONE\r
+
+
+
+
+
+
+
+
+
+
+
+
+BOTTOM 6 - GONE\r
+BOTTOM 5\r
+BOTTOM 4\r
+BOTTOM 3\r
+BOTTOM 2\r
+BOTTOM 1\e[6;19r
+
+
+
+
+And the third.\r
+
+
+
+
+
+
+
+
+
+
+This should be the last line.\r
+This one should be lost.\r
+This one's a goner, too.\r\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eMThis is second line.\r\eMThis should be the first line.\e[r\e[24d
+The end.\r
--- /dev/null
+TOP 2
+TOP 3
+TOP 4
+TOP 5
+This should be the first line.
+This is second line.
+And the third.
+
+
+
+
+
+
+
+
+
+
+This should be the last line.
+BOTTOM 5
+BOTTOM 4
+BOTTOM 3
+BOTTOM 2
+BOTTOM 1
+The end.
+
--- /dev/null
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x\e[5;9r\e[S\e[14;22r\e[3T\e[r\e[24d
--- /dev/null
+a
+ b
+ c
+ d
+ f
+ g
+ h
+ i
+
+ j
+ k
+ l
+ m
+
+
+
+ n
+ o
+ p
+ q
+ r
+ s
+ w
+ x
--- /dev/null
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x\e[10;19r\e[25B1\e[24d\e[25A2\e[r\e[24d
--- /dev/null
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j2
+k
+l
+m
+n
+o
+p
+q
+r
+1
+t
+u
+v
+w
+x
+
--- /dev/null
+ 1 (IL on line 2, expect nothing)
+ 2 (DL on line 22, expect nothing)
+ 3 vvvv IL on line 5, expected: A_BC
+ 4 A
+ 5 B
+ 6 C
+ 7 D
+ 8 ^^^^
+ 9 vvvv DL on line 11, expected: ACD_
+10 A
+11 B
+12 C
+13 D
+14 ^^^^
+15 vvvv IL on line 17, expected: A_
+16 A
+17 B
+18 ^^^^
+19 vvvv IL on line 21, expected: A_
+20 A
+21 B
+22 ^^^^
+23 vvvv IL on line 24, expected: _A
+24 A\e[4;7r
+\e[L\e[22d\e[M\e[5d\e[L\e[10;13r\e[11d\e[M\e[16;17r\e[17d\e[L\e[20;21r\e[21d\e[M\e[r\e[24d
+25 B
+26 ^^^^
+27 vvvv DL on line 28, expected: B_
+28 A
+29 B
+30 ^^^^
+31
+32\e[16;17r\e[16d\e[L\e[20;21r\e[20d\e[M\e[r\e[24d
--- /dev/null
+ 8 ^^^^
+ 9 vvvv DL on line 11, expected: ACD_
+10 A
+12 C
+13 D
+
+14 ^^^^
+15 vvvv IL on line 17, expected: A_
+16 A
+
+18 ^^^^
+19 vvvv IL on line 21, expected: A_
+20 A
+
+22 ^^^^
+
+23 vvvv IL on line 24, expected: _A
+25 B
+26 ^^^^
+28 A
+
+29 B
+30 ^^^^
+31
+32
--- /dev/null
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24\e[;4r\e[S\e[4;4HA\e[H
+\e[22r\e[S\e[24;5HB\e[H
+\e[6;7;8r\e[S\e[7;6HC\e[H
+\e[15;0r\e[S\e[24;7HD\e[H
+\e[10;10r\e[S\e[24;8HE\e[H
+\e[15;11r\e[S\e[24;9HF\e[H
+\e[23;28r\e[S\e[24;10HG\e[H
+\e[r\e[24d
+Done.
--- /dev/null
+ 3
+ 4
+ A
+ 5
+ 7
+ C
+ 8
+ 9
+10
+11
+12
+13
+14
+18
+19
+20
+21
+23
+24
+ B
+ D
+ F
+ G
+Done.
+
--- /dev/null
+a b c d e f g h i j k l
+ x
+1 2
+ \e[A3\e[B
+
+Tab before EOL:
+no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh@
+tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh @
+tab (2):abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg @
+
+Tab at EOL:
+no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi@
+tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi @
+with clipping: 4567890abcdefghi \eM\eD@
--- /dev/null
+a b c d e f g h i j k
+l
+ x
+1 3 2
+
+
+Tab before EOL:
+no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh@
+tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh@
+tab (2):abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg @
+
+Tab at EOL:
+no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi
+@
+tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi
+@
+with clipping: 4567890abcdefgh@
+
+
+
+
+
+
+
+
--- /dev/null
+default:
+> 1 2 3 4 5 6 7 8 9 0
+
+clear non-existant: \e[gx \e[gx
+> 1 2 3 4 5 6 7 8 9 0
+
+clear 2 and 4: \e[gx \e[gx
+> 1 3 5 6 7 8 9 0
+
+clear 0: \e[gx
+> 1 3 5 6 7 8 9 0
+
+clear after 0: .\e[gx
+> 1 3 5 6 7 8 9 0
+
+clear all:\e[3g
+> 0done
+
+TBC at end with clipping: ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde\e[g\eM\eD!
--- /dev/null
+default:
+> 1 2 3 4 5 6 7 8 9 0
+
+clear non-existant: x x
+> 1 2 3 4 5 6 7 8 9 0
+
+clear 2 and 4: x x
+> 1 3 5 6 7 8 9 0
+
+clear 0: x
+> 1 3 5 6 7 8 9 0
+
+clear after 0: .
+x
+> 1 3 5 6 7 8 9 0
+
+clear all:
+> 0
+done
+
+TBC at end with clipping: ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcd!
+
+
+
+
--- /dev/null
+ 1 2 3 4
+abcde\eHFghijklmnopqrstuv\eHWxyz
+ H 1 2 W 3 4
+
+HTS at end: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde\eHfgh
+ H 1 2 W 3 4 5 6 7 8 9 a b
+
+HTS at end with clipping: ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde\eH\eM\eD!
--- /dev/null
+ 1 2 3 4
+abcdeFghijklmnopqrstuvWxyz
+ H 1 2 W 3 4
+
+HTS at end: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde
+fgh
+ H 1 2 W 3 4 5 6 7 8 9 a
+b
+
+HTS at end with clipping: ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcd!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+a\e[Ib\e[Ic\e[Id\e[Ie\e[If\e[Ig\e[Ih\e[Ii\e[Ij\e[Ik\e[Il
+\e[I\e[I\e[I\e[Ix
+1\e[I2
+ \e[A3\e[B
+
+CHT before EOL:
+no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh@
+tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh\e[I@
+tab (2):abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg\e[I@
+
+CHT at EOL:
+no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi@
+tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi\e[I@
+with clipping: 4567890abcdefghi\e[I\eM\eD@
+
+a\e[4Ie\e[2Ig
+\e[4Ie \e[2Ih
+\e[100Ix
--- /dev/null
+a b c d e f g h i j k
+l
+ x
+1 3 2
+
+
+CHT before EOL:
+no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh@
+tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh@
+tab (2):abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg @
+
+CHT at EOL:
+no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi
+@
+tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi
+@
+with clipping: 4567890abcdefgh@
+
+a e g
+ e h
+ x
+
+
+
+
--- /dev/null
+a b c d e f g h i j k
+ <\e[ZI\e[Zi\e[2Zh\e[3Zf\e[10Za
+\e[Za
+
+default tab stops:
+near end: abcdefg\e[Z!
+at end: abcdefgh\e[Z!
+at end (2): abcdefgh\e[2Z!
+at end with clipping: abcdefgh\e[Z\eM\eD!
+at end with clipping (2): abcdefgh\e[2Z\eM\eD!
+
+set tab stop at column 80: \eHv
+at end: abcdefgh\e[Z!
+at end (2): abcdefgh\e[2Z!
+at end with clipping: abcdefgh\e[Z\eM\eD!
+at end with clipping (2): abcdefgh\e[2Z\eM\eD!
--- /dev/null
+a b c d e f g h i j k
+a f h i <
+a
+
+default tab stops:
+near end: !bcdefg
+at end: abcdefgh
+!
+at end (2): abcdefgh
+!
+at end with clipping: !bcdefgh
+at end with clipping (2): ! abcdefgh
+
+set tab stop at column 80: v
+at end: abcdefgh
+!
+at end (2): abcdefgh
+!
+at end with clipping: !bcdefgh
+at end with clipping (2): ! abcdefgh
+
+
+
+
+
--- /dev/null
+a b c d e f g h i j k
+a f h i <
+a
+
+default tab stops:
+near end: !bcdefg
+at end: abcdefgh
+!
+at end (2): abcdefgh
+!
+at end with clipping: !bcdefgh
+at end with clipping (2): ! abcdefgh
+
+set tab stop at column 80: v
+at end: abcdefgh
+!
+at end (2): abcdefgh
+!
+at end with clipping: !bcdefgh
+at end with clipping (2): ! abcdefgh
--- /dev/null
+a\e[?47h
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y\e[?47lz
+A\e[?47h
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y\e[?47lZ
+ --->\e[?47hhello\e[?47l<--
+
+ --->\e[?47h\e[?47l<---
+
+fin
--- /dev/null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ z
+AZ
+ <-- --->
+
+ --->
+<---
+
+fin
+
--- /dev/null
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y
+z
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+\e[?47h
+one
+two
+three
+four
+five
+six
+\e[3J
+\e[?47l
+11
--- /dev/null
+ n
+ o
+ p
+ q
+ r
+ s
+ t
+ u
+ v
+ w
+ x
+ y
+ z
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+
+ 11
--- /dev/null
+a
+ b\e7
+ c\e[?47h
+
+ >\e7
+
+ \e[5Sxxxxxxx\e8\e[?47l!\e8<
+
+
+
+
+
+
+
+The end.
--- /dev/null
+a
+ b<
+ c
+
+ !
+
+
+
+
+The end.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+-------- insert single '!' --------------------------------------------abcdefghi
+jklmnop\e[1;75H\e[4h!\e[4l
+
+
+-------- insert 0-9, with wraparound ----------------------------------abcdefghi
+jklmnop\e[4;75H\e[4h0123456789\e[4l
+
+-------- repeat 3 '!' -------------------------------------------------abcdefghi
+jklmnop\e[7;75H\e[4h!\e[2b\e[4l
+
+
+-------- repeat 10 '!', with wraparound -------------------------------abcdefghi
+jklmnop\e[10;75H\e[4h!\e[9b\e[4l
--- /dev/null
+-------- insert single '!' --------------------------------------------abc!defgh
+jklmnop
+
+-------- insert 0-9, with wraparound ----------------------------------abc012345
+6789jklmnop
+
+-------- repeat 3 '!' -------------------------------------------------abc!!!def
+jklmnop
+
+-------- repeat 10 '!', with wraparound -------------------------------abc!!!!!!
+!!!!jklmnop
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+a
+b
+c
+d\e[20h
+e
+f\vg\fh
+i\rj\rk\e[20l
+l
+m
+n\vo\fp\r
--- /dev/null
+a
+b
+c
+d
+e
+f
+g
+h
+k
+l
+m
+n
+ o
+ p
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+-------- default: wraparound ----------------------------------------------abcdefgh\e[?7h
+-------- set: wraparound ----------------------------------------------abcdefgh\e[?7l
+-------- unset: no wraparound -------------------------------------------abcdefgh
+ this should be immediately below "no wraparound"\e[?7h
--- /dev/null
+-------- default: wraparound ----------------------------------------------abcd
+efgh
+-------- set: wraparound ----------------------------------------------abcd
+efgh
+-------- unset: no wraparound -------------------------------------------abcd
+ this should be immediately below "no wraparound"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+\e[?45ha
+b\b\bA
+
+c\b\b\b-B
+
+d\b\bC!\e[H\b\b\b\b\b\b\bthe endreally!\e[?45l
--- /dev/null
+c C
+!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ the end
+really!
+
--- /dev/null
+<pre>
+Implemented non-color attributes:
+
+ 1: This is <span style="font-weight: bold">bold</span>.
+
+ 3: This is <span style="font-style: italic">italic</span>.
+
+ 4: This is <span style="text-decoration: underline">underlined</span>.
+
+ 5: This is <span style="text-decoration: blink">slowly blinking</span>.
+
+ 6: This is <span style="text-decoration: blink">rapidly blinking</span>.
+
+ 7: This is <span style="background-color: black; color: white">inverse</span>.
+
+ 8: This is <span style="visibility: hidden">hidden</span>.
+
+ 9: This is <span style="text-decoration: line-through">struck out</span>.
+
+21: This is <span style="text-decoration: underline; border-bottom: 1px solid">double underlined</span>.
+
+53: This is <span style="text-decoration: overline">overlined</span>.
+
+
+
+Unimplemented non-color attributes:
+
+ 2: weight:feint
+
+20: style:fraktur
+
+51: frame:box
+
+52: frame:circle
+</pre>
--- /dev/null
+Implemented non-color attributes:
+
+ 1: This is \e[1mbold\e[m.
+
+ 3: This is \e[3mitalic\e[m.
+
+ 4: This is \e[4munderlined\e[m.
+
+ 5: This is \e[5mslowly blinking\e[m.
+
+ 6: This is \e[6mrapidly blinking\e[m.
+
+ 7: This is \e[7minverse\e[m.
+
+ 8: This is \e[8mhidden\e[m.
+
+ 9: This is \e[9mstruck out\e[m.
+
+21: This is \e[21mdouble underlined\e[m.
+
+53: This is \e[53moverlined\e[m.
+
+
+
+Unimplemented non-color attributes:
+
+ 2: weight:feint
+
+20: style:fraktur
+
+51: frame:box
+
+52: frame:circle
--- /dev/null
+<pre>
+This is <span style="background-color: black; color: white">inverse text</span> with default fg and bg.
+<span style="color: #cd0000">This is </span><span style="color: white; background-color: #cd0000">inverse text</span><span style="color: #cd0000"> with red fg and default bg.</span>
+<span style="background-color: #cd0000">This is </span><span style="background-color: black; color: #cd0000">inverse text</span><span style="background-color: #cd0000"> with default fg and red bg.</span>
+<span style="background-color: #cd0000; color: #00cd00">This is </span><span style="background-color: #00cd00; color: #cd0000">inverse text</span><span style="background-color: #cd0000; color: #00cd00"> with green fg and red bg.</span>
+</pre>
--- /dev/null
+This is \e[7minverse text\e[27m with default fg and bg.
+\e[31mThis is \e[7minverse text\e[27m with red fg and default bg.\e[m
+\e[41mThis is \e[7minverse text\e[27m with default fg and red bg.\e[m
+\e[32;41mThis is \e[7minverse text\e[27m with green fg and red bg.\e[m
--- /dev/null
+Script started on Fri 27 Mar 2009 08:53:29 PM EDT
+dircolors: /etc/DIR_COLORS: No such file or directory\r
+\e]0;mark@mark-desktop:~/vt100-to-html\amark@mark-desktop:~/vt100-to-html$ bcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST \rUVWXYZ1234567890abcdefghijklmnopqrstuv\e[A\b\b\bcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV\e[1PWXYZ1234567890abcdefghijklmnopqrstuv\e[A\b\b\r
+\r\r
+\e]0;mark@mark-desktop:~/vt100-to-html\amark@mark-desktop:~/vt100-to-html$ exit\r
+
+Script done on Fri 27 Mar 2009 08:53:33 PM EDT
--- /dev/null
+Script started on Fri 27 Mar 2009 08:53:29 PM EDT
+dircolors: /etc/DIR_COLORS: No such file or directory
+mark@mark-desktop:~/vt100-to-html$ cdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU
+VWXYZ1234567890abcdefghijklmnopqrstuv
+mark@mark-desktop:~/vt100-to-html$ exit
+
+Script done on Fri 27 Mar 2009 08:53:33 PM EDT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+Script started on Sun 17 May 2009 06:20:41 PM EDT
+dircolors: /etc/DIR_COLORS: No such file or directory
+\e]0;mark@mark-desktop:~/vt100-to-html/scripts\amark@mark-desktop:~/vt100-to-html/scripts$ ls
+bash.script
+\e]0;mark@mark-desktop:~/vt100-to-html/scripts\amark@mark-desktop:~/vt100-to-html/scripts$ ls /
+bin dev initrd.img lib64 opt selinux usr
+boot etc initrd.img.old lost+found proc srv var
+boot2 home lib media root sys vmlinuz
+cdrom initrd lib32 mnt sbin tmp vmlinuz.old
+\e]0;mark@mark-desktop:~/vt100-to-html/scripts\amark@mark-desktop:~/vt100-to-html/scripts$ exit
+
+Script done on Sun 17 May 2009 06:20:52 PM EDT
--- /dev/null
+Script started on Sun 17 May 2009 06:20:41 PM EDT
+dircolors: /etc/DIR_COLORS: No such file or directory
+mark@mark-desktop:~/vt100-to-html/scripts$ ls
+bash.script
+mark@mark-desktop:~/vt100-to-html/scripts$ ls /
+bin dev initrd.img lib64 opt selinux usr
+boot etc initrd.img.old lost+found proc srv var
+boot2 home lib media root sys vmlinuz
+cdrom initrd lib32 mnt sbin tmp vmlinuz.old
+mark@mark-desktop:~/vt100-to-html/scripts$ exit
+
+Script done on Sun 17 May 2009 06:20:52 PM EDT
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+Script started on Sun 17 May 2009 06:21:05 PM EDT
+dircolors: /etc/DIR_COLORS: No such file or directory
+\e]0;mark@mark-desktop:~/vt100-to-html/scripts\amark@mark-desktop:~/vt100-to-html/scripts$ ls --color=auto /
+\e[00m\e[01;34mbin\e[00m \e[01;34mdev\e[00m \e[01;36minitrd.img\e[00m \e[01;36mlib64\e[00m \e[01;34mopt\e[00m \e[01;34mselinux\e[00m \e[01;34musr\e[00m
+\e[01;34mboot\e[00m \e[01;34metc\e[00m \e[01;36minitrd.img.old\e[00m \e[01;34mlost+found\e[00m \e[01;34mproc\e[00m \e[01;34msrv\e[00m \e[01;34mvar\e[00m
+\e[01;34mboot2\e[00m \e[01;34mhome\e[00m \e[01;34mlib\e[00m \e[01;34mmedia\e[00m \e[01;34mroot\e[00m \e[01;34msys\e[00m \e[01;36mvmlinuz\e[00m
+\e[01;36mcdrom\e[00m \e[01;34minitrd\e[00m \e[01;34mlib32\e[00m \e[01;34mmnt\e[00m \e[01;34msbin\e[00m \e[30;42mtmp\e[00m \e[01;36mvmlinuz.old\e[00m
+\e[m\e]0;mark@mark-desktop:~/vt100-to-html/scripts\amark@mark-desktop:~/vt100-to-html/scripts$ exit
+
+Script done on Sun 17 May 2009 06:21:11 PM EDT
--- /dev/null
+Script started on Sun 17 May 2009 06:21:05 PM EDT
+dircolors: /etc/DIR_COLORS: No such file or directory
+mark@mark-desktop:~/vt100-to-html/scripts$ ls --color=auto /
+bin dev initrd.img lib64 opt selinux usr
+boot etc initrd.img.old lost+found proc srv var
+boot2 home lib media root sys vmlinuz
+cdrom initrd lib32 mnt sbin tmp vmlinuz.old
+mark@mark-desktop:~/vt100-to-html/scripts$ exit
+
+Script done on Sun 17 May 2009 06:21:11 PM EDT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+Script started on Sun 17 May 2009 06:21:21 PM EDT
+\e]2;mark-desktop - ~/vt100-to-html/scripts\a\e[1m\e[7m%\e[27m\e[1m\e[0m \r\r\e[0m\e[27m\e[24m\e[J\e[1;32m$\e[0m \e[K\e[54C\e[1;34m~/vt100-to-html/scripts\e[0m\e[77Dl\bls /\r\r
+\e]2;mark-desktop - ls /\a\e[00m\e[01;34mbin\e[00m \e[01;34mdev\e[00m \e[01;36minitrd.img\e[00m \e[01;36mlib64\e[00m \e[01;34mopt\e[00m \e[01;34mselinux\e[00m \e[01;34musr\e[00m\r
+\e[01;34mboot\e[00m \e[01;34metc\e[00m \e[01;36minitrd.img.old\e[00m \e[01;34mlost+found\e[00m \e[01;34mproc\e[00m \e[01;34msrv\e[00m \e[01;34mvar\e[00m\r
+\e[01;34mboot2\e[00m \e[01;34mhome\e[00m \e[01;34mlib\e[00m \e[01;34mmedia\e[00m \e[01;34mroot\e[00m \e[01;34msys\e[00m \e[01;36mvmlinuz\e[00m\r
+\e[01;36mcdrom\e[00m \e[01;34minitrd\e[00m \e[01;34mlib32\e[00m \e[01;34mmnt\e[00m \e[01;34msbin\e[00m \e[30;42mtmp\e[00m \e[01;36mvmlinuz.old\e[00m\r
+\e[m\e]2;mark-desktop - ~/vt100-to-html/scripts\a\e[1m\e[7m%\e[27m\e[1m\e[0m \r\r\e[0m\e[27m\e[24m\e[J\e[1;32m$\e[0m \e[K\e[54C\e[1;34m~/vt100-to-html/scripts\e[0m\e[77D\r\r
+
+Script done on Sun 17 May 2009 06:21:27 PM EDT
--- /dev/null
+Script started on Sun 17 May 2009 06:21:21 PM EDT
+$ ls / ~/vt100-to-html/scripts
+bin dev initrd.img lib64 opt selinux usr
+boot etc initrd.img.old lost+found proc srv var
+boot2 home lib media root sys vmlinuz
+cdrom initrd lib32 mnt sbin tmp vmlinuz.old
+$ ~/vt100-to-html/scripts
+
+Script done on Sun 17 May 2009 06:21:27 PM EDT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+Script started on Sun 15 Aug 2010 11:53:27 PM EDT
+\e]0;mark-desktop - ~/vt100-to-html/test\a\e[1m\e[7m%\e[27m\e[1m\e[0m \r\r\e[0m\e[27m\e[24m\e[J\e[1;32m$\e[0m \e[K\e[57C\e[1;34m~/vt100-to-html/test\e[0m\e[77Dl\bls\r\r
+\e]0;mark-desktop - ls\a\e[0m\e[01;34mexpected_text\e[0m t0016-SU.text t0050-ICH.text\r
+\e[01;34minput\e[0m t0017-SD.in t0051-IL.in\r
+\e[01;32mrun_all.py\e[0m t0017-SD.text t0051-IL.text\r
+t0001-all_printable.in t0020-CUF.in t0052-DL.in\r
+t0001-all_printable.text t0020-CUF.text t0052-DL.text\r
+t0002-history.in t0021-CUB.in t0053-DCH.in\r
+t0002-history.text t0021-CUB.text t0053-DCH.text\r
+t0003-line_wrap.in t0022-CUU.in t0054-ECH.in\r
+t0003-line_wrap.text t0022-CUU.text t0054-ECH.text\r
+t0004-LF.in t0023-CUU_scroll.in t0055-EL.in\r
+t0004-LF.text t0023-CUU_scroll.text t0055-EL.text\r
+t0005-CR.in t0024-CUD.in t0056-ED.in\r
+t0005-CR.text t0024-CUD.text t0056-ED.text\r
+t0006-IND.in t0025-CUP.in t0057-ED3.in\r
+t0006-IND.text t0025-CUP.text t0057-ED3.note\r
+t0007-space_at_end.in t0026-CNL.in t0057-ED3.text\r
+t0007-space_at_end.text t0026-CNL.text t0060-DECSC.in\r
+t0008-BS.in t0027-CPL.in t0060-DECSC.text\r
+t0008-BS.text t0027-CPL.text t0061-CSI_s.in\r
+t0009-NEL.in t0030-HPR.in t0061-CSI_s.text\r
+t0009-NEL.text t0030-HPR.text t008x-alt_screen_ED.in\r
+t0010-RI.in t0031-HPB.in t008x-IRM.in\r
+t0010-RI.text t0031-HPB.text t008x-NLM.in\r
+t0011-RI_scroll.in t0032-VPB.in t008x-save_cursor_mode.in\r
+t0011-RI_scroll.text t0032-VPB.text t0500-bash_long_line.in\r
+t0012-VT.in t0033-VPB_scroll.in t0500-bash_long_line.text\r
+t0012-VT.text t0033-VPB_scroll.text t0501-bash_ls.in\r
+t0013-FF.in t0034-VPR.in t0501-bash_ls.text\r
+t0013-FF.text t0034-VPR.text t0502-bash_ls_color.in\r
+t0014-CAN.in t0035-HVP.in t0502-bash_ls_color.text\r
+t0014-CAN.text t0035-HVP.text t0503-zsh_ls_color.in\r
+t0015-SUB.in t0040-REP.in t0503-zsh_ls_color.text\r
+t0015-SUB.text t0040-REP.text typescript\r
+t0016-SU.in t0050-ICH.in\r
+\e[m\e]0;mark-desktop - ~/vt100-to-html/test\a\e[1m\e[7m%\e[27m\e[1m\e[0m \r\r\e[0m\e[27m\e[24m\e[J\e[1;32m$\e[0m \e[K\e[57C\e[1;34m~/vt100-to-html/test\e[0m\e[77Dv\bvim\r\r
+\e]0;mark-desktop - vim\a\e[?1000h\e[?1049h\e[?1h\e=\e[1;24r\e[?12;25h\e[?12l\e[?25h\e[27m\e[m\e[H\e[2J\e[>c\e[?25l\e[2;1H\e[38;5;12m~ \e[3;1H~ \e[4;1H~ \e[5;1H~ \e[6;1H~ \e[7;1H~ \e[8;1H~ \e[9;1H~ \e[10;1H~ \e[11;1H~ \e[12;1H~ \e[13;1H~ \e[14;1H~ \e[15;1H~ \e[16;1H~ \e[17;1H~ \e[18;1H~ \e[19;1H~ \e[20;1H~ \e[21;1H~ \e[22;1H~ \e[m\e[23;1H\e[1m\e[7m\e[38;5;68m[No Name] 0,0-1 All\e[m\e[6;32HVIM - Vi IMproved\e[8;33Hversion 7.2.267\e[9;29Hby Bram Moolenaar et al.\e[10;19HVim is open source and freely distributable\e[12;26HBecome a registered Vim user!\e[13;18Htype :help register\e[38;5;81m<Enter>\e[m for information \e[15;18Htype :q\e[38;5;81m<Enter>\e[m to exit \e[16;18Htype :help\e[38;5;81m<Enter>\e[m or \e[38;5;81m<F1>\e[m for on-line help\e[17;18Htype :help version7\e[38;5;81m<Enter>\e[m for version info\e]2;[No Name] - VIM\a\e]1;[No Name]\a\e[1;1H\e[?12l\e[?25h\e[?1000l\e[?1002h\eP+q436f\e\\eP+q6b75\e\\eP+q6b64\e\\eP+q6b72\e\\eP+q6b6c\e\\eP+q2332\e\\eP+q2334\e\\eP+q2569\e\\eP+q2a37\e\\eP+q6b31\e\\e[?25l\e[24;1H\e[1m\e[38;5;3m-- INSERT --\e[m\e[23;65H\e[1m\e[7m\e[38;5;68m1 \e[1;1H\e[?12l\e[?25h\e[?25l\e[mT\e[6;32H\e[38;5;12m \e[8;33H \e[9;29H \e[10;19H \e[12;26H \e[13;18H \e[15;18H \e[16;18H \e[17;18H \e[m\e[23;11H\e[1m\e[7m\e[38;5;68m[+]\e[49C1,2 \e]2;[No Name] + - VIM\a\e]1;[No Name]\a\e[1;2H\e[?12l\e[?25h\e[?25l\e[m\bTh\e[23;65H\e[1m\e[7m\e[38;5;68m3 \e[1;3H\e[?12l\e[?25h\e[?25l\e[m\bhi\e[23;65H\e[1m\e[7m\e[38;5;68m4 \e[1;4H\e[?12l\e[?25h\e[?25l\e[m\bis\e[23;65H\e[1m\e[7m\e[38;5;68m5 \e[1;5H\e[?12l\e[?25h\e[?25l\e[23;65H6 \e[1;6H\e[?12l\e[?25h\e[?25l\e[m\b i\e[23;65H\e[1m\e[7m\e[38;5;68m7 \e[1;7H\e[?12l\e[?25h\e[?25l\e[m\bis\e[23;65H\e[1m\e[7m\e[38;5;68m8 \e[1;8H\e[?12l\e[?25h\e[?25l\e[23;65H9 \e[1;9H\e[?12l\e[?25h\e[?25l\e[m\b a\e[23;65H\e[1m\e[7m\e[38;5;68m10\e[1;10H\e[?12l\e[?25h\e[?25l\e[23;66H1 \e[1;11H\e[?12l\e[?25h\e[?25l\e[m\b t\e[23;66H\e[1m\e[7m\e[38;5;68m2 \e[1;12H\e[?12l\e[?25h\e[?25l\e[m\bte\e[23;66H\e[1m\e[7m\e[38;5;68m3 \e[1;13H\e[?12l\e[?25h\e[?25l\e[m\bes\e[23;66H\e[1m\e[7m\e[38;5;68m4 \e[1;14H\e[?12l\e[?25h\e[?25l\e[m\bst\e[23;66H\e[1m\e[7m\e[38;5;68m5 \e[1;15H\e[?12l\e[?25h\e[?25l\e[m\bt.\e[23;66H\e[1m\e[7m\e[38;5;68m6 \e[1;16H\e[?12l\e[?25h\e[?25l\e[m\e[2;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m2,1 \e[2;1H\e[?12l\e[?25h\e[?25l\e[m\e[3;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m3,\e[3;1H\e[?12l\e[?25h\e[?25l\e[mH\e[23;65H\e[1m\e[7m\e[38;5;68m2 \e[3;2H\e[?12l\e[?25h\e[?25l\e[m\bHo\e[23;65H\e[1m\e[7m\e[38;5;68m3 \e[3;3H\e[?12l\e[?25h\e[?25l\e[m\boe\e[23;65H\e[1m\e[7m\e[38;5;68m4 \e[3;4H\e[?12l\e[?25h\e[?25l\e[23;65H5 \e[3;5H\e[?12l\e[?25h\e[?25l\e[m\b f\e[23;65H\e[1m\e[7m\e[38;5;68m6 \e[3;6H\e[?12l\e[?25h\e[?25l\e[m\bfu\e[23;65H\e[1m\e[7m\e[38;5;68m7 \e[3;7H\e[?12l\e[?25h\e[?25l\e[m\e[3;6H\e[K\e[23;65H\e[1m\e[7m\e[38;5;68m6 \e[3;6H\e[?12l\e[?25h\e[?25l\e[m\e[3;5H\e[K\e[23;65H\e[1m\e[7m\e[38;5;68m5 \e[3;5H\e[?12l\e[?25h\e[?25l\e[23;65H4 \e[3;4H\e[?12l\e[?25h\e[?25l\e[m\e[3;3H\e[K\e[23;65H\e[1m\e[7m\e[38;5;68m3 \e[3;3H\e[?12l\e[?25h\e[?25l\e[m\bop\e[23;65H\e[1m\e[7m\e[38;5;68m4 \e[3;4H\e[?12l\e[?25h\e[?25l\e[m\bpe\e[23;65H\e[1m\e[7m\e[38;5;68m5 \e[3;5H\e[?12l\e[?25h\e[?25l\e[m\bef\e[23;65H\e[1m\e[7m\e[38;5;68m6 \e[3;6H\e[?12l\e[?25h\e[?25l\e[m\bfu\e[23;65H\e[1m\e[7m\e[38;5;68m7 \e[3;7H\e[?12l\e[?25h\e[?25l\e[m\bul\e[23;65H\e[1m\e[7m\e[38;5;68m8 \e[3;8H\e[?12l\e[?25h\e[?25l\e[m\bll\e[23;65H\e[1m\e[7m\e[38;5;68m9 \e[3;9H\e[?12l\e[?25h\e[?25l\e[m\bly\e[23;65H\e[1m\e[7m\e[38;5;68m10\e[3;10H\e[?12l\e[?25h\e[?25l\e[23;66H1 \e[3;11H\e[?12l\e[?25h\e[?25l\e[m\b i\e[23;66H\e[1m\e[7m\e[38;5;68m2 \e[3;12H\e[?12l\e[?25h\e[?25l\e[m\bit\e[23;66H\e[1m\e[7m\e[38;5;68m3 \e[3;13H\e[?12l\e[?25h\e[?25l\e[23;66H4 \e[3;14H\e[?12l\e[?25h\e[?25l\e[m\b w\e[23;66H\e[1m\e[7m\e[38;5;68m5 \e[3;15H\e[?12l\e[?25h\e[?25l\e[m\bwi\e[23;66H\e[1m\e[7m\e[38;5;68m6 \e[3;16H\e[?12l\e[?25h\e[?25l\e[m\bil\e[23;66H\e[1m\e[7m\e[38;5;68m7 \e[3;17H\e[?12l\e[?25h\e[?25l\e[m\bll\e[23;66H\e[1m\e[7m\e[38;5;68m8 \e[3;18H\e[?12l\e[?25h\e[?25l\e[23;66H9 \e[3;19H\e[?12l\e[?25h\e[?25l\e[m\b w\e[23;65H\e[1m\e[7m\e[38;5;68m20 \e[3;20H\e[?12l\e[?25h\e[?25l\e[m\bwo\e[23;66H\e[1m\e[7m\e[38;5;68m1 \e[3;21H\e[?12l\e[?25h\e[?25l\e[m\bor\e[23;66H\e[1m\e[7m\e[38;5;68m2 \e[3;22H\e[?12l\e[?25h\e[?25l\e[m\brk\e[23;66H\e[1m\e[7m\e[38;5;68m3 \e[3;23H\e[?12l\e[?25h\e[?25l\e[m\bk.\e[23;66H\e[1m\e[7m\e[38;5;68m4 \e[3;24H\e[?12l\e[?25h\e[?25l\e[m\e[4;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m4,1 \e[4;1H\e[?12l\e[?25h\e[?25l\e[m\e[5;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m5,\e[5;1H\e[?12l\e[?25h\e[?25l\e[m\e[6;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m6,\e[6;1H\e[?12l\e[?25h\e[?25l\e[m\e[7;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m7,\e[7;1H\e[?12l\e[?25h\e[?25l\e[m\e[8;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m8,\e[8;1H\e[?12l\e[?25h\e[?25l\e[m\e[9;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m9,\e[9;1H\e[?12l\e[?25h\e[?25l\e[m\e[10;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m10,1\e[10;1H\e[?12l\e[?25h\e[?25l\e[m\e[11;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m1,\e[11;1H\e[?12l\e[?25h\e[?25l\e[m\e[12;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m2,\e[12;1H\e[?12l\e[?25h\e[?25l\e[m\e[13;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m3,\e[13;1H\e[?12l\e[?25h\e[?25l\e[m\e[14;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m4,\e[14;1H\e[?12l\e[?25h\e[?25l\e[m\e[15;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m5,\e[15;1H\e[?12l\e[?25h\e[?25l\e[m\e[16;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m6,\e[16;1H\e[?12l\e[?25h\e[?25l\e[m\e[17;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m7,\e[17;1H\e[?12l\e[?25h\e[?25l\e[m\e[18;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m8,\e[18;1H\e[?12l\e[?25h\e[?25l\e[m\e[19;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m9,\e[19;1H\e[?12l\e[?25h\e[?25l\e[m\e[20;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m20,\e[20;1H\e[?12l\e[?25h\e[?25l\e[m\e[21;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m1,\e[21;1H\e[?12l\e[?25h\e[?25l\e[m\e[22;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m2,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
+\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m3,\e[12CBot\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
+\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m4,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
+\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m5,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
+\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m6,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
+\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m7,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
+\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m8,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
+\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m9,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
+\e[1;24r\e[23;63H\e[1m\e[7m\e[38;5;68m30,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
+\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m1,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
+\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m2,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
+\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m3,\e[22;1H\e[?12l\e[?25h\e[?25l\e[mI\e[23;66H\e[1m\e[7m\e[38;5;68m2 \e[22;2H\e[?12l\e[?25h\e[?25l\e[23;66H3 \e[22;3H\e[?12l\e[?25h\e[?25l\e[m\b b\e[23;66H\e[1m\e[7m\e[38;5;68m4 \e[22;4H\e[?12l\e[?25h\e[?25l\e[m\bbe\e[23;66H\e[1m\e[7m\e[38;5;68m5 \e[22;5H\e[?12l\e[?25h\e[?25l\e[m\bet\e[23;66H\e[1m\e[7m\e[38;5;68m6 \e[22;6H\e[?12l\e[?25h\e[?25l\e[23;66H7 \e[22;7H\e[?12l\e[?25h\e[?25l\e[m\b i\e[23;66H\e[1m\e[7m\e[38;5;68m8 \e[22;8H\e[?12l\e[?25h\e[?25l\e[m\bit\e[23;66H\e[1m\e[7m\e[38;5;68m9 \e[22;9H\e[?12l\e[?25h\e[?25l\e[23;66H10\e[22;10H\e[?12l\e[?25h\e[?25l\e[m\b w\e[23;67H\e[1m\e[7m\e[38;5;68m1 \e[22;11H\e[?12l\e[?25h\e[?25l\e[m\bwi\e[23;67H\e[1m\e[7m\e[38;5;68m2 \e[22;12H\e[?12l\e[?25h\e[?25l\e[m\bil\e[23;67H\e[1m\e[7m\e[38;5;68m3 \e[22;13H\e[?12l\e[?25h\e[?25l\e[m\bll\e[23;67H\e[1m\e[7m\e[38;5;68m4 \e[22;14H\e[?12l\e[?25h\e[?25l\e[m\bl.\e[23;67H\e[1m\e[7m\e[38;5;68m5 \e[22;15H\e[?12l\e[?25h\e[m\e[24;1H\e[K\e[22;14H\e[?25l\e[23;67H\e[1m\e[7m\e[38;5;68m4 \e[22;14H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[1;1H\e[11L\e[1;24r\e[1;1HThis is a test.\r
+\r
+Hopefully it will work.\e[23;63H\e[1m\e[7m\e[38;5;68m1,1 \e[9CTop\e[1;1H\e[?12l\e[?25h\e[?25l\e[27m\e[m\e[H\e[2J\e[13;1HI bet it will.\r
+\e[38;5;12m~ \e[15;1H~ \e[16;1H~ \e[17;1H~ \e[18;1H~ \e[19;1H~ \e[20;1H~ \e[21;1H~ \e[22;1H~ \e[m\e[23;1H\e[1m\e[7m\e[38;5;68m[No Name] [+] 21,0-1 Bot\e[1;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[1;1H\e[L\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m0,\e[1;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[1;1H\e[L\e[1;24r\e[23;63H\e[1m\e[7m\e[38;5;68m19,\e[1;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[1;1H\e[L\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m8,\e[1;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[1;1H\e[L\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m7,\e[1;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[1;1H\e[L\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m6,\e[1;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[1;1H\e[L\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m5,\e[1;1H\e[?12l\e[?25h\e[?25l\e[24;1H\e[m:\e[?12l\e[?25hw\e[?25l\e[?12l\e[?25hq\e[?25l\e[?12l\e[?25h\r\e[?25l\e[38;5;15m\e[48;5;1mE32: No file name\e[1;1H\e[?12l\e[?25h\e[?25l\e[m\e[24;1H\e[K\e[24;1H:\e[?12l\e[?25hw\e[?25l\e[?12l\e[?25h\e[?25l \e[?12l\e[?25hf\e[?25l\e[?12l\e[?25ho\e[?25l\e[?12l\e[?25ho\e[?25l\e[?12l\e[?25h\r\e[?25l"foo" [New] 33L, 85C written\e[23;1H\e[1m\e[7m\e[38;5;68mfoo \e]2;foo (~/vt100-to-html/test) - VIM\a\e]1;foo\a\e[1;1H\e[?12l\e[?25h\e[?25l\e[m\e[24;1H\e[K\e[24;1H:\e[?12l\e[?25hq\e[?25l\e[?12l\e[?25h\r\e[?25l\e[?1002l\e]2;mark-desktop - vim\a\e]1;mark-desktop - vim\a\e[24;1H\e[K\e[24;1H\e[?1l\e>\e[?12l\e[?25h\e[?1049l\e]0;mark-desktop - ~/vt100-to-html/test\a\e[1m\e[7m%\e[27m\e[1m\e[0m \r\r\e[0m\e[27m\e[24m\e[J\e[1;32m$\e[0m \e[K\e[57C\e[1;34m~/vt100-to-html/test\e[0m\e[77De\becho Yes!\r\r
+\e]0;mark-desktop - echo Yes!\aYes!\r
+\e]0;mark-desktop - ~/vt100-to-html/test\a\e[1m\e[7m%\e[27m\e[1m\e[0m \r\r\e[0m\e[27m\e[24m\e[J\e[1;32m$\e[0m \e[K\e[57C\e[1;34m~/vt100-to-html/test\e[0m\e[77D\r\r
+
+Script done on Sun 15 Aug 2010 11:54:14 PM EDT
--- /dev/null
+t0005-CR.in t0024-CUD.in t0056-ED.in
+t0005-CR.text t0024-CUD.text t0056-ED.text
+t0006-IND.in t0025-CUP.in t0057-ED3.in
+t0006-IND.text t0025-CUP.text t0057-ED3.note
+t0007-space_at_end.in t0026-CNL.in t0057-ED3.text
+t0007-space_at_end.text t0026-CNL.text t0060-DECSC.in
+t0008-BS.in t0027-CPL.in t0060-DECSC.text
+t0008-BS.text t0027-CPL.text t0061-CSI_s.in
+t0009-NEL.in t0030-HPR.in t0061-CSI_s.text
+t0009-NEL.text t0030-HPR.text t008x-alt_screen_ED.in
+t0010-RI.in t0031-HPB.in t008x-IRM.in
+t0010-RI.text t0031-HPB.text t008x-NLM.in
+t0011-RI_scroll.in t0032-VPB.in t008x-save_cursor_mode.in
+t0011-RI_scroll.text t0032-VPB.text t0500-bash_long_line.in
+t0012-VT.in t0033-VPB_scroll.in t0500-bash_long_line.text
+t0012-VT.text t0033-VPB_scroll.text t0501-bash_ls.in
+t0013-FF.in t0034-VPR.in t0501-bash_ls.text
+t0013-FF.text t0034-VPR.text t0502-bash_ls_color.in
+t0014-CAN.in t0035-HVP.in t0502-bash_ls_color.text
+t0014-CAN.text t0035-HVP.text t0503-zsh_ls_color.in
+t0015-SUB.in t0040-REP.in t0503-zsh_ls_color.text
+t0015-SUB.text t0040-REP.text typescript
+t0016-SU.in t0050-ICH.in
+$ vim ~/vt100-to-html/test
+Script done on Sun 15 Aug 2010 11:54:14 PM EDT ~/vt100-to-html/test
--- /dev/null
+var assert = require('chai').assert;
+var expect = require('chai').expect;
+var Terminal = require('../xterm');
+
+describe('xterm.js', function() {
+ var xterm;
+
+ beforeEach(function () {
+ xterm = new Terminal();
+ xterm.refresh = function(){};
+ xterm.viewport = {
+ syncScrollArea: function(){}
+ };
+ });
+
+ describe('getOption', function() {
+ it('should retrieve the option correctly', function() {
+ // In the `options` namespace.
+ xterm.options.cursorBlink = true;
+ assert.equal(xterm.getOption('cursorBlink'), true);
+
+ // On the Terminal instance
+ delete xterm.options.cursorBlink;
+ xterm.cursorBlink = false;
+ assert.equal(xterm.getOption('cursorBlink'), false);
+ });
+ it('should throw when retrieving a non-existant option', function() {
+ assert.throws(xterm.getOption.bind(xterm, 'fake', true));
+ });
+ });
+
+ describe('setOption', function() {
+ it('should set the option correctly', function() {
+ xterm.setOption('cursorBlink', true);
+ assert.equal(xterm.cursorBlink, true);
+ assert.equal(xterm.options.cursorBlink, true);
+ xterm.setOption('cursorBlink', false);
+ assert.equal(xterm.cursorBlink, false);
+ assert.equal(xterm.options.cursorBlink, false);
+ });
+ it('should throw when setting a non-existant option', function() {
+ assert.throws(xterm.setOption.bind(xterm, 'fake', true));
+ });
+ });
+
+ describe('clear', function() {
+ it('should clear a buffer equal to rows', function() {
+ var promptLine = xterm.lines[xterm.ybase + xterm.y];
+ xterm.clear();
+ assert.equal(xterm.y, 0);
+ assert.equal(xterm.ybase, 0);
+ assert.equal(xterm.ydisp, 0);
+ assert.equal(xterm.lines.length, xterm.rows);
+ assert.deepEqual(xterm.lines[0], promptLine);
+ for (var i = 1; i < xterm.rows; i++) {
+ assert.deepEqual(xterm.lines[0], xterm.blankLine());
+ }
+ });
+ it('should clear a buffer larger than rows', function() {
+ // Fill the buffer with dummy rows
+ for (var i = 0; i < xterm.rows * 2; i++) {
+ xterm.write('test\n');
+ }
+
+ var promptLine = xterm.lines[xterm.ybase + xterm.y];
+ xterm.clear();
+ assert.equal(xterm.y, 0);
+ assert.equal(xterm.ybase, 0);
+ assert.equal(xterm.ydisp, 0);
+ assert.equal(xterm.lines.length, xterm.rows);
+ assert.deepEqual(xterm.lines[0], promptLine);
+ for (var i = 1; i < xterm.rows; i++) {
+ assert.deepEqual(xterm.lines[i], xterm.blankLine());
+ }
+ });
+ it('should not break the prompt when cleared twice', function() {
+ var promptLine = xterm.lines[xterm.ybase + xterm.y];
+ xterm.clear();
+ xterm.clear();
+ assert.equal(xterm.y, 0);
+ assert.equal(xterm.ybase, 0);
+ assert.equal(xterm.ydisp, 0);
+ assert.equal(xterm.lines.length, xterm.rows);
+ assert.deepEqual(xterm.lines[0], promptLine);
+ for (var i = 1; i < xterm.rows; i++) {
+ assert.deepEqual(xterm.lines[i], xterm.blankLine());
+ }
+ });
+ });
+
+ describe('scroll', function() {
+ describe('scrollDisp', function() {
+ var startYDisp;
+ beforeEach(function() {
+ for (var i = 0; i < xterm.rows * 2; i++) {
+ xterm.writeln('test');
+ }
+ startYDisp = xterm.rows + 1;
+ });
+ it('should scroll a single line', function() {
+ assert.equal(xterm.ydisp, startYDisp);
+ xterm.scrollDisp(-1);
+ assert.equal(xterm.ydisp, startYDisp - 1);
+ xterm.scrollDisp(1);
+ assert.equal(xterm.ydisp, startYDisp);
+ });
+ it('should scroll multiple lines', function() {
+ assert.equal(xterm.ydisp, startYDisp);
+ xterm.scrollDisp(-5);
+ assert.equal(xterm.ydisp, startYDisp - 5);
+ xterm.scrollDisp(5);
+ assert.equal(xterm.ydisp, startYDisp);
+ });
+ it('should not scroll beyond the bounds of the buffer', function() {
+ assert.equal(xterm.ydisp, startYDisp);
+ xterm.scrollDisp(1);
+ assert.equal(xterm.ydisp, startYDisp);
+ for (var i = 0; i < startYDisp; i++) {
+ xterm.scrollDisp(-1);
+ }
+ assert.equal(xterm.ydisp, 0);
+ xterm.scrollDisp(-1);
+ assert.equal(xterm.ydisp, 0);
+ });
+ });
+
+ describe('scrollPages', function() {
+ var startYDisp;
+ beforeEach(function() {
+ for (var i = 0; i < xterm.rows * 3; i++) {
+ xterm.writeln('test');
+ }
+ startYDisp = (xterm.rows * 2) + 1;
+ });
+ it('should scroll a single page', function() {
+ assert.equal(xterm.ydisp, startYDisp);
+ xterm.scrollPages(-1);
+ assert.equal(xterm.ydisp, startYDisp - (xterm.rows - 1));
+ xterm.scrollPages(1);
+ assert.equal(xterm.ydisp, startYDisp);
+ });
+ it('should scroll a multiple pages', function() {
+ assert.equal(xterm.ydisp, startYDisp);
+ xterm.scrollPages(-2);
+ assert.equal(xterm.ydisp, startYDisp - (xterm.rows - 1) * 2);
+ xterm.scrollPages(2);
+ assert.equal(xterm.ydisp, startYDisp);
+ });
+ });
+
+ describe('scrollToTop', function() {
+ beforeEach(function() {
+ for (var i = 0; i < xterm.rows * 3; i++) {
+ xterm.writeln('test');
+ }
+ });
+ it('should scroll to the top', function() {
+ assert.notEqual(xterm.ydisp, 0);
+ xterm.scrollToTop();
+ assert.equal(xterm.ydisp, 0);
+ });
+ });
+
+ describe('scrollToBottom', function() {
+ var startYDisp;
+ beforeEach(function() {
+ for (var i = 0; i < xterm.rows * 3; i++) {
+ xterm.writeln('test');
+ }
+ startYDisp = (xterm.rows * 2) + 1;
+ });
+ it('should scroll to the bottom', function() {
+ xterm.scrollDisp(-1);
+ xterm.scrollToBottom();
+ assert.equal(xterm.ydisp, startYDisp);
+ xterm.scrollPages(-1);
+ xterm.scrollToBottom();
+ assert.equal(xterm.ydisp, startYDisp);
+ xterm.scrollToTop();
+ xterm.scrollToBottom();
+ assert.equal(xterm.ydisp, startYDisp);
+ });
+ });
+ });
+
+ describe('evaluateKeyEscapeSequence', function() {
+ it('should return the correct escape sequence for unmodified keys', function() {
+ // Backspace
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 8 }).key, '\x7f'); // ^?
+ // Tab
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 9 }).key, '\t');
+ // Return/enter
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 13 }).key, '\r'); // CR
+ // Escape
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 27 }).key, '\x1b');
+ // Page up, page down
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 33 }).key, '\x1b[5~'); // CSI 5 ~
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 34 }).key, '\x1b[6~'); // CSI 6 ~
+ // End, Home
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 35 }).key, '\x1b[F'); // SS3 F
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 36 }).key, '\x1b[H'); // SS3 H
+ // Left, up, right, down arrows
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 37 }).key, '\x1b[D'); // CSI D
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 38 }).key, '\x1b[A'); // CSI A
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 39 }).key, '\x1b[C'); // CSI C
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 40 }).key, '\x1b[B'); // CSI B
+ // Insert
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 45 }).key, '\x1b[2~'); // CSI 2 ~
+ // Delete
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 46 }).key, '\x1b[3~'); // CSI 3 ~
+ // F1-F12
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 112 }).key, '\x1bOP'); // SS3 P
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 113 }).key, '\x1bOQ'); // SS3 Q
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 114 }).key, '\x1bOR'); // SS3 R
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 115 }).key, '\x1bOS'); // SS3 S
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 116 }).key, '\x1b[15~'); // CSI 1 5 ~
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 117 }).key, '\x1b[17~'); // CSI 1 7 ~
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 118 }).key, '\x1b[18~'); // CSI 1 8 ~
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 119 }).key, '\x1b[19~'); // CSI 1 9 ~
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 120 }).key, '\x1b[20~'); // CSI 2 0 ~
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 121 }).key, '\x1b[21~'); // CSI 2 1 ~
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 122 }).key, '\x1b[23~'); // CSI 2 3 ~
+ assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 123 }).key, '\x1b[24~'); // CSI 2 4 ~
+ });
+ it('should return \\x1b[3;5~ for ctrl+delete', function() {
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 46 }).key, '\x1b[3;5~');
+ });
+ it('should return \\x1b[3;2~ for shift+delete', function() {
+ assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 46 }).key, '\x1b[3;2~');
+ });
+ it('should return \\x1b[3;3~ for alt+delete', function() {
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 46 }).key, '\x1b[3;3~');
+ });
+ it('should return \\x1b[5D for ctrl+left', function() {
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 37 }).key, '\x1b[1;5D'); // CSI 5 D
+ });
+ it('should return \\x1b[5C for ctrl+right', function() {
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 39 }).key, '\x1b[1;5C'); // CSI 5 C
+ });
+ it('should return \\x1b[5A for ctrl+up', function() {
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 38 }).key, '\x1b[1;5A'); // CSI 5 A
+ });
+ it('should return \\x1b[5B for ctrl+down', function() {
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 40 }).key, '\x1b[1;5B'); // CSI 5 B
+ });
+ // Evalueate alt + arrow key movement, which is a feature of terminal emulators but not VT100
+ // http://unix.stackexchange.com/a/108106
+ it('should return \\x1b[5D for alt+left', function() {
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 37 }).key, '\x1b[1;5D'); // CSI 5 D
+ });
+ it('should return \\x1b[5C for alt+right', function() {
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 39 }).key, '\x1b[1;5C'); // CSI 5 C
+ });
+ it('should return \\x1b[5A for alt+up', function() {
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 38 }).key, '\x1b[1;5A'); // CSI 5 A
+ });
+ it('should return \\x1b[5B for alt+down', function() {
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 40 }).key, '\x1b[1;5B'); // CSI 5 B
+ });
+ it('should return the correct escape sequence for modified F1-F12 keys', function() {
+ assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 112 }).key, '\x1b[1;2P');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 113 }).key, '\x1b[1;2Q');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 114 }).key, '\x1b[1;2R');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 115 }).key, '\x1b[1;2S');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 116 }).key, '\x1b[15;2~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 117 }).key, '\x1b[17;2~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 118 }).key, '\x1b[18;2~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 119 }).key, '\x1b[19;2~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 120 }).key, '\x1b[20;2~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 121 }).key, '\x1b[21;2~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 122 }).key, '\x1b[23;2~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 123 }).key, '\x1b[24;2~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 112 }).key, '\x1b[1;3P');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 113 }).key, '\x1b[1;3Q');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 114 }).key, '\x1b[1;3R');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 115 }).key, '\x1b[1;3S');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 116 }).key, '\x1b[15;3~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 117 }).key, '\x1b[17;3~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 118 }).key, '\x1b[18;3~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 119 }).key, '\x1b[19;3~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 120 }).key, '\x1b[20;3~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 121 }).key, '\x1b[21;3~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 122 }).key, '\x1b[23;3~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 123 }).key, '\x1b[24;3~');
+
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 112 }).key, '\x1b[1;5P');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 113 }).key, '\x1b[1;5Q');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 114 }).key, '\x1b[1;5R');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 115 }).key, '\x1b[1;5S');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 116 }).key, '\x1b[15;5~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 117 }).key, '\x1b[17;5~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 118 }).key, '\x1b[18;5~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 119 }).key, '\x1b[19;5~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 120 }).key, '\x1b[20;5~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 121 }).key, '\x1b[21;5~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 122 }).key, '\x1b[23;5~');
+ assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 123 }).key, '\x1b[24;5~');
+ });
+ });
+
+ describe('attachCustomEventHandler', function () {
+ var evKeyDown = {
+ preventDefault: function() {},
+ stopPropagation: function() {},
+ type: 'keydown'
+ }
+
+ beforeEach(function() {
+ xterm.handler = function() {};
+ xterm.showCursor = function() {};
+ xterm.clearSelection = function() {};
+ xterm.compositionHelper = {
+ keydown: {
+ bind: function() {
+ return function () { return true; }
+ }
+ }
+ }
+ });
+
+ it('should process the keydown event based on what the handler returns', function () {
+ assert.equal(xterm.keyDown(Object.assign({}, evKeyDown, { keyCode: 77 })), true);
+ xterm.attachCustomKeydownHandler(function (ev) {
+ return ev.keyCode === 77;
+ });
+ assert.equal(xterm.keyDown(Object.assign({}, evKeyDown, { keyCode: 77 })), true);
+ xterm.attachCustomKeydownHandler(function (ev) {
+ return ev.keyCode !== 77;
+ });
+ assert.equal(xterm.keyDown(Object.assign({}, evKeyDown, { keyCode: 77 })), false);
+ });
+
+ it('should alive after reset(ESC c Full Reset (RIS))', function () {
+ xterm.attachCustomKeydownHandler(function (ev) {
+ return ev.keyCode !== 77;
+ });
+ assert.equal(xterm.keyDown(Object.assign({}, evKeyDown, { keyCode: 77 })), false);
+ xterm.reset();
+ assert.equal(xterm.keyDown(Object.assign({}, evKeyDown, { keyCode: 77 })), false);
+ });
+ });
+
+ describe('Third level shift', function() {
+ var evKeyDown = {
+ preventDefault: function() {},
+ stopPropagation: function() {},
+ type: 'keydown'
+ },
+ evKeyPress = {
+ preventDefault: function() {},
+ stopPropagation: function() {},
+ type: 'keypress'
+ };
+
+ beforeEach(function() {
+ xterm.handler = function() {};
+ xterm.showCursor = function() {};
+ xterm.clearSelection = function() {};
+ xterm.compositionHelper = {
+ isComposing: false,
+ keydown: {
+ bind: function() {
+ return function() { return true; };
+ }
+ }
+ };
+ });
+
+ describe('On Mac OS', function() {
+ beforeEach(function() {
+ xterm.isMac = true;
+ });
+
+ it('should not interfere with the alt key on keyDown', function() {
+ assert.equal(
+ xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, keyCode: 81 })),
+ true
+ );
+ assert.equal(
+ xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, keyCode: 192 })),
+ true
+ );
+ });
+
+ it('should interefere with the alt + arrow keys', function() {
+ assert.equal(
+ xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, keyCode: 37 })),
+ false
+ );
+ assert.equal(
+ xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, keyCode: 39 })),
+ false
+ );
+ });
+
+ it('should emit key with alt + key on keyPress', function(done) {
+ var keys = ['@', '@', '\\', '\\', '|', '|'];
+
+ xterm.on('keypress', function(key) {
+ if (key) {
+ var index = keys.indexOf(key);
+ assert(index !== -1, "Emitted wrong key: " + key);
+ keys.splice(index, 1);
+ }
+ if (keys.length === 0) done();
+ });
+
+ xterm.keyPress(Object.assign({}, evKeyPress, { altKey: true, keyCode: 64 })); // @
+ // Firefox
+ xterm.keyPress(Object.assign({}, evKeyPress, { altKey: true, charCode: 64, keyCode: 0 }));
+ xterm.keyPress(Object.assign({}, evKeyPress, { altKey: true, keyCode: 92 })); // \
+ xterm.keyPress(Object.assign({}, evKeyPress, { altKey: true, charCode: 92, keyCode: 0 }));
+ xterm.keyPress(Object.assign({}, evKeyPress, { altKey: true, keyCode: 124 })); // |
+ xterm.keyPress(Object.assign({}, evKeyPress, { altKey: true, charCode: 124, keyCode: 0 }));
+ });
+ });
+
+ describe('On MS Windows', function() {
+ beforeEach(function() {
+ xterm.isMSWindows = true;
+ });
+
+ it('should not interfere with the alt + ctrl key on keyDown', function() {
+ assert.equal(
+ xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, ctrlKey: true, keyCode: 81 })),
+ true
+ );
+ assert.equal(
+ xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, ctrlKey: true, keyCode: 192 })),
+ true
+ );
+ });
+
+ it('should interefere with the alt + ctrl + arrow keys', function() {
+ assert.equal(
+ xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, ctrlKey: true, keyCode: 37 })),
+ false
+ );
+ assert.equal(
+ xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, ctrlKey: true, keyCode: 39 })),
+ false
+ );
+ });
+
+ it('should emit key with alt + ctrl + key on keyPress', function(done) {
+ var keys = ['@', '@', '\\', '\\', '|', '|'];
+
+ xterm.on('keypress', function(key) {
+ if (key) {
+ var index = keys.indexOf(key);
+ assert(index !== -1, "Emitted wrong key: " + key);
+ keys.splice(index, 1);
+ }
+ if (keys.length === 0) done();
+ });
+
+ xterm.keyPress(
+ Object.assign({}, evKeyPress, { altKey: true, ctrlKey: true, keyCode: 64 })
+ ); // @
+ xterm.keyPress(
+ Object.assign({}, evKeyPress, { altKey: true, ctrlKey: true, charCode: 64, keyCode: 0 })
+ );
+ xterm.keyPress(
+ Object.assign({}, evKeyPress, { altKey: true, ctrlKey: true, keyCode: 92 })
+ ); // \
+ xterm.keyPress(
+ Object.assign({}, evKeyPress, { altKey: true, ctrlKey: true, charCode: 92, keyCode: 0 })
+ );
+ xterm.keyPress(
+ Object.assign({}, evKeyPress, { altKey: true, ctrlKey: true, keyCode: 124 })
+ ); // |
+ xterm.keyPress(
+ Object.assign({}, evKeyPress, { altKey: true, ctrlKey: true, charCode: 124, keyCode: 0 })
+ );
+ });
+ });
+ });
+
+ describe('unicode - surrogates', function() {
+ it('2 characters per cell', function () {
+ var high = String.fromCharCode(0xD800);
+ for (var i=0xDC00; i<=0xDCFF; ++i) {
+ xterm.write(high + String.fromCharCode(i));
+ var tchar = xterm.lines[0][0];
+ expect(tchar[1]).eql(high + String.fromCharCode(i));
+ expect(tchar[1].length).eql(2);
+ expect(tchar[2]).eql(1);
+ expect(xterm.lines[0][1][1]).eql(' ');
+ xterm.reset();
+ }
+ });
+ it('2 characters at last cell', function() {
+ var high = String.fromCharCode(0xD800);
+ for (var i=0xDC00; i<=0xDCFF; ++i) {
+ xterm.x = xterm.cols - 1;
+ xterm.write(high + String.fromCharCode(i));
+ expect(xterm.lines[0][xterm.x-1][1]).eql(high + String.fromCharCode(i));
+ expect(xterm.lines[0][xterm.x-1][1].length).eql(2);
+ expect(xterm.lines[1][0][1]).eql(' ');
+ xterm.reset();
+ }
+ });
+ it('2 characters per cell over line end with autowrap', function() {
+ var high = String.fromCharCode(0xD800);
+ for (var i=0xDC00; i<=0xDCFF; ++i) {
+ xterm.x = xterm.cols - 1;
+ xterm.wraparoundMode = true;
+ xterm.write('a' + high + String.fromCharCode(i));
+ expect(xterm.lines[0][xterm.cols-1][1]).eql('a');
+ expect(xterm.lines[1][0][1]).eql(high + String.fromCharCode(i));
+ expect(xterm.lines[1][0][1].length).eql(2);
+ expect(xterm.lines[1][1][1]).eql(' ');
+ xterm.reset();
+ }
+ });
+ it('2 characters per cell over line end without autowrap', function() {
+ var high = String.fromCharCode(0xD800);
+ for (var i=0xDC00; i<=0xDCFF; ++i) {
+ xterm.x = xterm.cols - 1;
+ xterm.wraparoundMode = false;
+ xterm.write('a' + high + String.fromCharCode(i));
+ expect(xterm.lines[0][xterm.cols-1][1]).eql(high + String.fromCharCode(i));
+ expect(xterm.lines[0][xterm.cols-1][1].length).eql(2);
+ expect(xterm.lines[1][1][1]).eql(' ');
+ xterm.reset();
+ }
+ });
+ it('splitted surrogates', function() {
+ var high = String.fromCharCode(0xD800);
+ for (var i=0xDC00; i<=0xDCFF; ++i) {
+ xterm.write(high);
+ xterm.write(String.fromCharCode(i));
+ var tchar = xterm.lines[0][0];
+ expect(tchar[1]).eql(high + String.fromCharCode(i));
+ expect(tchar[1].length).eql(2);
+ expect(tchar[2]).eql(1);
+ expect(xterm.lines[0][1][1]).eql(' ');
+ xterm.reset();
+ }
+ });
+ });
+
+ describe('unicode - combining characters', function() {
+ it('café', function () {
+ xterm.write('cafe\u0301');
+ expect(xterm.lines[0][3][1]).eql('e\u0301');
+ expect(xterm.lines[0][3][1].length).eql(2);
+ expect(xterm.lines[0][3][2]).eql(1);
+ });
+ it('café - end of line', function() {
+ xterm.x = xterm.cols - 1 - 3;
+ xterm.write('cafe\u0301');
+ expect(xterm.lines[0][xterm.cols-1][1]).eql('e\u0301');
+ expect(xterm.lines[0][xterm.cols-1][1].length).eql(2);
+ expect(xterm.lines[0][xterm.cols-1][2]).eql(1);
+ expect(xterm.lines[0][1][1]).eql(' ');
+ expect(xterm.lines[0][1][1].length).eql(1);
+ expect(xterm.lines[0][1][2]).eql(1);
+ });
+ it('multiple combined é', function() {
+ xterm.wraparoundMode = true;
+ xterm.write(Array(100).join('e\u0301'));
+ for (var i=0; i<xterm.cols; ++i) {
+ var tchar = xterm.lines[0][i];
+ expect(tchar[1]).eql('e\u0301');
+ expect(tchar[1].length).eql(2);
+ expect(tchar[2]).eql(1);
+ }
+ tchar = xterm.lines[1][0];
+ expect(tchar[1]).eql('e\u0301');
+ expect(tchar[1].length).eql(2);
+ expect(tchar[2]).eql(1);
+ });
+ it('multiple surrogate with combined', function() {
+ xterm.wraparoundMode = true;
+ xterm.write(Array(100).join('\uD800\uDC00\u0301'));
+ for (var i=0; i<xterm.cols; ++i) {
+ var tchar = xterm.lines[0][i];
+ expect(tchar[1]).eql('\uD800\uDC00\u0301');
+ expect(tchar[1].length).eql(3);
+ expect(tchar[2]).eql(1);
+ }
+ tchar = xterm.lines[1][0];
+ expect(tchar[1]).eql('\uD800\uDC00\u0301');
+ expect(tchar[1].length).eql(3);
+ expect(tchar[2]).eql(1);
+ });
+ });
+
+ describe('unicode - fullwidth characters', function() {
+ it('cursor movement even', function() {
+ expect(xterm.x).eql(0);
+ xterm.write('¥');
+ expect(xterm.x).eql(2);
+ });
+ it('cursor movement odd', function() {
+ xterm.x = 1;
+ expect(xterm.x).eql(1);
+ xterm.write('¥');
+ expect(xterm.x).eql(3);
+ });
+ it('line of ¥ even', function() {
+ xterm.wraparoundMode = true;
+ xterm.write(Array(50).join('¥'));
+ for (var i=0; i<xterm.cols; ++i) {
+ var tchar = xterm.lines[0][i];
+ if (i % 2) {
+ expect(tchar[1]).eql('');
+ expect(tchar[1].length).eql(0);
+ expect(tchar[2]).eql(0);
+ } else {
+ expect(tchar[1]).eql('¥');
+ expect(tchar[1].length).eql(1);
+ expect(tchar[2]).eql(2);
+ }
+ }
+ tchar = xterm.lines[1][0];
+ expect(tchar[1]).eql('¥');
+ expect(tchar[1].length).eql(1);
+ expect(tchar[2]).eql(2);
+ });
+ it('line of ¥ odd', function() {
+ xterm.wraparoundMode = true;
+ xterm.x = 1;
+ xterm.write(Array(50).join('¥'));
+ for (var i=1; i<xterm.cols-1; ++i) {
+ var tchar = xterm.lines[0][i];
+ if (!(i % 2)) {
+ expect(tchar[1]).eql('');
+ expect(tchar[1].length).eql(0);
+ expect(tchar[2]).eql(0);
+ } else {
+ expect(tchar[1]).eql('¥');
+ expect(tchar[1].length).eql(1);
+ expect(tchar[2]).eql(2);
+ }
+ }
+ tchar = xterm.lines[0][xterm.cols-1];
+ expect(tchar[1]).eql(' ');
+ expect(tchar[1].length).eql(1);
+ expect(tchar[2]).eql(1);
+ tchar = xterm.lines[1][0];
+ expect(tchar[1]).eql('¥');
+ expect(tchar[1].length).eql(1);
+ expect(tchar[2]).eql(2);
+ });
+ it('line of ¥ with combining odd', function() {
+ xterm.wraparoundMode = true;
+ xterm.x = 1;
+ xterm.write(Array(50).join('¥\u0301'));
+ for (var i=1; i<xterm.cols-1; ++i) {
+ var tchar = xterm.lines[0][i];
+ if (!(i % 2)) {
+ expect(tchar[1]).eql('');
+ expect(tchar[1].length).eql(0);
+ expect(tchar[2]).eql(0);
+ } else {
+ expect(tchar[1]).eql('¥\u0301');
+ expect(tchar[1].length).eql(2);
+ expect(tchar[2]).eql(2);
+ }
+ }
+ tchar = xterm.lines[0][xterm.cols-1];
+ expect(tchar[1]).eql(' ');
+ expect(tchar[1].length).eql(1);
+ expect(tchar[2]).eql(1);
+ tchar = xterm.lines[1][0];
+ expect(tchar[1]).eql('¥\u0301');
+ expect(tchar[1].length).eql(2);
+ expect(tchar[2]).eql(2);
+ });
+ it('line of ¥ with combining even', function() {
+ xterm.wraparoundMode = true;
+ xterm.write(Array(50).join('¥\u0301'));
+ for (var i=0; i<xterm.cols; ++i) {
+ var tchar = xterm.lines[0][i];
+ if (i % 2) {
+ expect(tchar[1]).eql('');
+ expect(tchar[1].length).eql(0);
+ expect(tchar[2]).eql(0);
+ } else {
+ expect(tchar[1]).eql('¥\u0301');
+ expect(tchar[1].length).eql(2);
+ expect(tchar[2]).eql(2);
+ }
+ }
+ tchar = xterm.lines[1][0];
+ expect(tchar[1]).eql('¥\u0301');
+ expect(tchar[1].length).eql(2);
+ expect(tchar[2]).eql(2);
+ });
+ it('line of surrogate fullwidth with combining odd', function() {
+ xterm.wraparoundMode = true;
+ xterm.x = 1;
+ xterm.write(Array(50).join('\ud843\ude6d\u0301'));
+ for (var i=1; i<xterm.cols-1; ++i) {
+ var tchar = xterm.lines[0][i];
+ if (!(i % 2)) {
+ expect(tchar[1]).eql('');
+ expect(tchar[1].length).eql(0);
+ expect(tchar[2]).eql(0);
+ } else {
+ expect(tchar[1]).eql('\ud843\ude6d\u0301');
+ expect(tchar[1].length).eql(3);
+ expect(tchar[2]).eql(2);
+ }
+ }
+ tchar = xterm.lines[0][xterm.cols-1];
+ expect(tchar[1]).eql(' ');
+ expect(tchar[1].length).eql(1);
+ expect(tchar[2]).eql(1);
+ tchar = xterm.lines[1][0];
+ expect(tchar[1]).eql('\ud843\ude6d\u0301');
+ expect(tchar[1].length).eql(3);
+ expect(tchar[2]).eql(2);
+ });
+ it('line of surrogate fullwidth with combining even', function() {
+ xterm.wraparoundMode = true;
+ xterm.write(Array(50).join('\ud843\ude6d\u0301'));
+ for (var i=0; i<xterm.cols; ++i) {
+ var tchar = xterm.lines[0][i];
+ if (i % 2) {
+ expect(tchar[1]).eql('');
+ expect(tchar[1].length).eql(0);
+ expect(tchar[2]).eql(0);
+ } else {
+ expect(tchar[1]).eql('\ud843\ude6d\u0301');
+ expect(tchar[1].length).eql(3);
+ expect(tchar[2]).eql(2);
+ }
+ }
+ tchar = xterm.lines[1][0];
+ expect(tchar[1]).eql('\ud843\ude6d\u0301');
+ expect(tchar[1].length).eql(3);
+ expect(tchar[2]).eql(2);
+ });
+ });
+
+ describe('insert mode', function() {
+ it('halfwidth - all', function () {
+ xterm.write(Array(9).join('0123456789').slice(-80));
+ xterm.x = 10;
+ xterm.y = 0;
+ xterm.insertMode = true;
+ xterm.write('abcde');
+ expect(xterm.lines[0].length).eql(xterm.cols);
+ expect(xterm.lines[0][10][1]).eql('a');
+ expect(xterm.lines[0][14][1]).eql('e');
+ expect(xterm.lines[0][15][1]).eql('0');
+ expect(xterm.lines[0][79][1]).eql('4');
+ });
+ it('fullwidth - insert', function() {
+ xterm.write(Array(9).join('0123456789').slice(-80));
+ xterm.x = 10;
+ xterm.y = 0;
+ xterm.insertMode = true;
+ xterm.write('¥¥¥');
+ expect(xterm.lines[0].length).eql(xterm.cols);
+ expect(xterm.lines[0][10][1]).eql('¥');
+ expect(xterm.lines[0][11][1]).eql('');
+ expect(xterm.lines[0][14][1]).eql('¥');
+ expect(xterm.lines[0][15][1]).eql('');
+ expect(xterm.lines[0][79][1]).eql('3');
+ });
+ it('fullwidth - right border', function() {
+ xterm.write(Array(41).join('¥'));
+ xterm.x = 10;
+ xterm.y = 0;
+ xterm.insertMode = true;
+ xterm.write('a');
+ expect(xterm.lines[0].length).eql(xterm.cols);
+ expect(xterm.lines[0][10][1]).eql('a');
+ expect(xterm.lines[0][11][1]).eql('¥');
+ expect(xterm.lines[0][79][1]).eql(' '); // fullwidth char got replaced
+ xterm.write('b');
+ expect(xterm.lines[0].length).eql(xterm.cols);
+ expect(xterm.lines[0][11][1]).eql('b');
+ expect(xterm.lines[0][12][1]).eql('¥');
+ expect(xterm.lines[0][79][1]).eql(''); // empty cell after fullwidth
+ });
+ });
+});
--- /dev/null
+var assert = require('chai').assert;
+var Terminal = require('../xterm');
+
+describe('Viewport', function () {
+ var terminal;
+ var viewportElement;
+ var charMeasureElement;
+ var viewport;
+ var scrollAreaElement;
+
+ var CHARACTER_HEIGHT = 10;
+
+ beforeEach(function () {
+ terminal = {
+ lines: [],
+ rows: 0,
+ ydisp: 0,
+ on: function () {},
+ rowContainer: {
+ style: {
+ lineHeight: 0
+ }
+ }
+ };
+ viewportElement = {
+ addEventListener: function () {},
+ style: {
+ height: 0,
+ lineHeight: 0
+ }
+ };
+ scrollAreaElement = {
+ style: {
+ height: 0
+ }
+ };
+ charMeasureElement = {
+ getBoundingClientRect: function () {
+ return { width: null, height: CHARACTER_HEIGHT };
+ }
+ };
+ viewport = new Terminal.Viewport(terminal, viewportElement, scrollAreaElement, charMeasureElement);
+ });
+
+ describe('Public API', function () {
+ it('should define Viewport.prototype.onWheel', function () {
+ assert.isDefined(Terminal.Viewport.prototype.onWheel);
+ });
+ });
+
+ describe('refresh', function () {
+ it('should set the line-height of the terminal', function () {
+ assert.equal(viewportElement.style.lineHeight, CHARACTER_HEIGHT + 'px');
+ assert.equal(terminal.rowContainer.style.lineHeight, CHARACTER_HEIGHT + 'px');
+ charMeasureElement.getBoundingClientRect = function () {
+ return { width: null, height: 1 };
+ };
+ viewport.refresh();
+ assert.equal(viewportElement.style.lineHeight, '1px');
+ assert.equal(terminal.rowContainer.style.lineHeight, '1px');
+ });
+ it('should set the height of the viewport when the line-height changed', function () {
+ terminal.lines.push('');
+ terminal.lines.push('');
+ terminal.rows = 1;
+ viewport.refresh();
+ assert.equal(viewportElement.style.height, 1 * CHARACTER_HEIGHT + 'px');
+ charMeasureElement.getBoundingClientRect = function () {
+ return { width: null, height: 20 };
+ };
+ viewport.refresh();
+ assert.equal(viewportElement.style.height, 20 + 'px');
+ });
+ });
+
+ describe('syncScrollArea', function () {
+ it('should sync the scroll area', function () {
+ terminal.lines.push('');
+ terminal.rows = 1;
+ assert.equal(scrollAreaElement.style.height, 0 * CHARACTER_HEIGHT + 'px');
+ viewport.syncScrollArea();
+ assert.equal(viewportElement.style.height, 1 * CHARACTER_HEIGHT + 'px');
+ assert.equal(scrollAreaElement.style.height, 1 * CHARACTER_HEIGHT + 'px');
+ terminal.lines.push('');
+ viewport.syncScrollArea();
+ assert.equal(viewportElement.style.height, 1 * CHARACTER_HEIGHT + 'px');
+ assert.equal(scrollAreaElement.style.height, 2 * CHARACTER_HEIGHT + 'px');
+ });
+ });
+});
Terminal.loadAddon = function(addon, callback) {
if (typeof exports === 'object' && typeof module === 'object') {
// CommonJS
- return require('../addons/' + addon);
+ return require('./addons/' + addon + '/' + addon);
} else if (typeof define == 'function') {
// RequireJS
- return require(['../addons/' + addon + '/' + addon], callback);
+ return require(['./addons/' + addon + '/' + addon], callback);
} else {
console.error('Cannot load a module without a CommonJS or RequireJS environment.');
return false;
+++ /dev/null
-var assert = require('chai').assert;
-var Terminal = require('../../dist/xterm');
-var linkify = require('../../addons/linkify/linkify');
-
-describe('linkify addon', function () {
- var xterm;
-
- describe('API', function () {
- it('should define Terminal.prototype.linkify', function () {
- assert.isDefined(Terminal.prototype.linkify);
- });
- it('should define Terminal.prototype.linkifyTerminalLine', function () {
- assert.isDefined(Terminal.prototype.linkifyTerminalLine);
- });
- });
-
- describe('findUrlMatchOnLine', function () {
- describe('strict regex', function () {
- it('should match when the entire text is a match', function () {
- assert.equal(linkify.findLinkMatch('http://github.com', false), 'http://github.com');
- assert.equal(linkify.findLinkMatch('http://127.0.0.1', false), 'http://127.0.0.1');
- });
- it('should match simple domains', function () {
- assert.equal(linkify.findLinkMatch('foo http://github.com bar', false), 'http://github.com');
- assert.equal(linkify.findLinkMatch('foo http://www.github.com bar', false), 'http://www.github.com');
- assert.equal(linkify.findLinkMatch('foo https://github.com bar', false), 'https://github.com');
- assert.equal(linkify.findLinkMatch('foo https://www.github.com bar', false), 'https://www.github.com');
- });
- it('should match web addresses with alpha paths', function () {
- assert.equal(linkify.findLinkMatch('foo http://github.com/a/b/c bar', false), 'http://github.com/a/b/c');
- assert.equal(linkify.findLinkMatch('foo http://www.github.com/a/b/c bar', false), 'http://www.github.com/a/b/c');
- });
- it('should not include whitespace surrounding a match', function () {
- assert.equal(linkify.findLinkMatch(' http://github.com', false), 'http://github.com');
- assert.equal(linkify.findLinkMatch('http://github.com ', false), 'http://github.com');
- assert.equal(linkify.findLinkMatch(' http://github.com ', false), 'http://github.com');
- });
- it('should match IP addresses', function () {
- assert.equal(linkify.findLinkMatch('foo http://127.0.0.1 bar', false), 'http://127.0.0.1');
- assert.equal(linkify.findLinkMatch('foo https://127.0.0.1 bar', false), 'https://127.0.0.1');
- });
- it('should match ports on both domains and IP addresses', function () {
- assert.equal(linkify.findLinkMatch('foo http://127.0.0.1:8080 bar', false), 'http://127.0.0.1:8080');
- assert.equal(linkify.findLinkMatch('foo http://www.github.com:8080 bar', false), 'http://www.github.com:8080');
- });
- });
- });
-});
+++ /dev/null
-var assert = require('chai').assert;
-var Terminal = require('../../src/xterm');
-var distTerminal = require('../../dist/xterm');
-
-describe('xterm.js addons', function() {
- it('should load addons with Terminal.loadAddon', function () {
- Terminal.loadAddon('attach');
- // Test that addon was loaded successfully
- assert.equal(typeof distTerminal.prototype.attach, 'function');
- });
-});
+++ /dev/null
-var assert = require('chai').assert;
-var Terminal = require('../src/xterm');
-var Clipboard = require('../src/handlers/Clipboard');
-
-
-describe('evaluateCopiedTextProcessing', function () {
- it('should strip trailing whitespaces and replace nbsps with spaces', function () {
- var nonBreakingSpace = String.fromCharCode(160),
- copiedText = 'echo' + nonBreakingSpace + 'hello' + nonBreakingSpace,
- processedText = Clipboard.prepareTextForClipboard(copiedText);
-
- // No trailing spaces
- assert.equal(processedText.match(/\s+$/), null);
-
- // No non-breaking space
- assert.equal(processedText.indexOf(nonBreakingSpace), -1);
- });
-});
+++ /dev/null
-var assert = require('chai').assert;
-var Terminal = require('../build/xterm');
-
-describe('CompositionHelper', function () {
- var terminal;
- var compositionHelper;
- var compositionView;
- var textarea;
- var handledText;
-
- beforeEach(function () {
- compositionView = {
- classList: {
- add: function () {},
- remove: function () {},
- },
- getBoundingClientRect: function () {
- return { width: 0 };
- },
- style: {
- left: 0,
- top: 0
- },
- textContent: ''
- };
- textarea = {
- value: '',
- style: {
- left: 0,
- top: 0
- }
- };
- terminal = {
- element: {
- querySelector: function () {
- return { offsetLeft: 0, offsetTop: 0 };
- }
- },
- handler: function (text) {
- handledText += text;
- }
- };
- handledText = '';
- compositionHelper = new Terminal.CompositionHelper(textarea, compositionView, terminal);
- });
-
- describe('Public API', function () {
- it('should define CompositionHelper.prototype.compositionstart', function () {
- assert.isDefined(Terminal.CompositionHelper.prototype.compositionstart);
- });
- it('should define CompositionHelper.prototype.compositionupdate', function () {
- assert.isDefined(Terminal.CompositionHelper.prototype.compositionupdate);
- });
- it('should define CompositionHelper.prototype.compositionend', function () {
- assert.isDefined(Terminal.CompositionHelper.prototype.compositionend);
- });
- it('should define CompositionHelper.prototype.finalizeComposition', function () {
- assert.isDefined(Terminal.CompositionHelper.prototype.finalizeComposition);
- });
- it('should define CompositionHelper.prototype.handleAnyTextareaChanges', function () {
- assert.isDefined(Terminal.CompositionHelper.prototype.handleAnyTextareaChanges);
- });
- it('should define CompositionHelper.prototype.updateCompositionElements', function () {
- assert.isDefined(Terminal.CompositionHelper.prototype.updateCompositionElements);
- });
- it('should define CompositionHelper.isComposing', function () {
- assert.isDefined(compositionHelper.isComposing);
- });
- it('should define CompositionHelper.isSendingComposition', function () {
- assert.isDefined(compositionHelper.isSendingComposition);
- });
- });
-
- describe('Input', function () {
- it('Should insert simple characters', function (done) {
- // First character 'ㅇ'
- compositionHelper.compositionstart();
- compositionHelper.compositionupdate({ data: 'ㅇ' });
- textarea.value = 'ㅇ';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionend();
- setTimeout(function() { // wait for any textarea updates
- assert.equal(handledText, 'ㅇ');
- // Second character 'ㅇ'
- compositionHelper.compositionstart();
- compositionHelper.compositionupdate({ data: 'ㅇ' });
- textarea.value = 'ㅇㅇ';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionend();
- setTimeout(function() { // wait for any textarea updates
- assert.equal(handledText, 'ㅇㅇ');
- done();
- }, 0);
- }, 0);
- }, 0);
- }, 0);
- });
-
- it('Should insert complex characters', function (done) {
- // First character '앙'
- compositionHelper.compositionstart();
- compositionHelper.compositionupdate({ data: 'ㅇ' });
- textarea.value = 'ㅇ';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionupdate({ data: '아' });
- textarea.value = '아';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionupdate({ data: '앙' });
- textarea.value = '앙';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionend();
- setTimeout(function() { // wait for any textarea updates
- assert.equal(handledText, '앙');
- // Second character '앙'
- compositionHelper.compositionstart();
- compositionHelper.compositionupdate({ data: 'ㅇ' });
- textarea.value = '앙ㅇ';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionupdate({ data: '아' });
- textarea.value = '앙아';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionupdate({ data: '앙' });
- textarea.value = '앙앙';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionend();
- setTimeout(function() { // wait for any textarea updates
- assert.equal(handledText, '앙앙');
- done();
- }, 0);
- }, 0);
- }, 0);
- }, 0);
- }, 0);
- }, 0);
- }, 0);
- }, 0);
- });
-
- it('Should insert complex characters that change with following character', function (done) {
- // First character '아'
- compositionHelper.compositionstart();
- compositionHelper.compositionupdate({ data: 'ㅇ' });
- textarea.value = 'ㅇ';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionupdate({ data: '아' });
- textarea.value = '아';
- setTimeout(function() { // wait for any textarea updates
- // Start second character '아' in first character
- compositionHelper.compositionupdate({ data: '앙' });
- textarea.value = '앙';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionend();
- compositionHelper.compositionstart();
- compositionHelper.compositionupdate({ data: '아' });
- textarea.value = '아아'
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionend();
- setTimeout(function() { // wait for any textarea updates
- assert.equal(handledText, '아아');
- done();
- }, 0);
- }, 0);
- }, 0);
- }, 0);
- }, 0);
- });
-
- it('Should insert multi-characters compositions', function (done) {
- // First character 'だ'
- compositionHelper.compositionstart();
- compositionHelper.compositionupdate({ data: 'd' });
- textarea.value = 'd';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionupdate({ data: 'だ' });
- textarea.value = 'だ';
- setTimeout(function() { // wait for any textarea updates
- // Second character 'あ'
- compositionHelper.compositionupdate({ data: 'だあ' });
- textarea.value = 'だあ';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionend();
- setTimeout(function() { // wait for any textarea updates
- assert.equal(handledText, 'だあ');
- done();
- }, 0);
- }, 0);
- }, 0);
- }, 0);
- });
-
- it('Should insert multi-character compositions that are converted to other characters with the same length', function (done) {
- // First character 'だ'
- compositionHelper.compositionstart();
- compositionHelper.compositionupdate({ data: 'd' });
- textarea.value = 'd';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionupdate({ data: 'だ' });
- textarea.value = 'だ';
- setTimeout(function() { // wait for any textarea updates
- // Second character 'ー'
- compositionHelper.compositionupdate({ data: 'だー' });
- textarea.value = 'だー';
- setTimeout(function() { // wait for any textarea updates
- // Convert to katakana 'ダー'
- compositionHelper.compositionupdate({ data: 'ダー' });
- textarea.value = 'ダー';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionend();
- setTimeout(function() { // wait for any textarea updates
- assert.equal(handledText, 'ダー');
- done();
- }, 0);
- }, 0);
- }, 0);
- }, 0);
- }, 0);
- })
-
- it('Should insert multi-character compositions that are converted to other characters with different lengths', function (done) {
- // First character 'い'
- compositionHelper.compositionstart();
- compositionHelper.compositionupdate({ data: 'い' });
- textarea.value = 'い';
- setTimeout(function() { // wait for any textarea updates
- // Second character 'ま'
- compositionHelper.compositionupdate({ data: 'いm' });
- textarea.value = 'いm';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionupdate({ data: 'いま' });
- textarea.value = 'いま';
- setTimeout(function() { // wait for any textarea updates
- // Convert to kanji '今'
- compositionHelper.compositionupdate({ data: '今' });
- textarea.value = '今';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionend();
- setTimeout(function() { // wait for any textarea updates
- assert.equal(handledText, '今');
- done();
- }, 0);
- }, 0);
- }, 0);
- }, 0);
- }, 0);
- });
-
- it('Should insert non-composition characters input immediately after composition characters', function (done) {
- // First character 'ㅇ'
- compositionHelper.compositionstart();
- compositionHelper.compositionupdate({ data: 'ㅇ' });
- textarea.value = 'ㅇ';
- setTimeout(function() { // wait for any textarea updates
- compositionHelper.compositionend();
- // Second character '1' (a non-composition character)
- textarea.value = 'ㅇ1';
- setTimeout(function() { // wait for any textarea updates
- assert.equal(handledText, 'ㅇ1');
- done();
- }, 0);
- }, 0);
- });
- });
-});
+++ /dev/null
-var glob = require('glob');
-var fs = require('fs');
-var pty = require('pty.js');
-var sleep = require('sleep');
-var Terminal = require('../build/xterm');
-
-var CONSOLE_LOG = console.log;
-
-// expect files need terminal at 80x25!
-var COLS = 80;
-var ROWS = 25;
-
-/** some helpers for pty interaction */
-// we need a pty in between to get the termios decorations
-// for the basic test cases a raw pty device is enough
-var primitive_pty = pty.native.open(COLS, ROWS);
-
-// fake sychronous pty write - read
-// we just pipe the data from slave to master as a child program would do
-// pty.js opens pipe fds with O_NONBLOCK
-// just wait 10ms instead of setting fds to blocking mode
-function pty_write_read(s) {
- fs.writeSync(primitive_pty.slave, s);
- sleep.usleep(10000);
- var b = Buffer(64000);
- var bytes = fs.readSync(primitive_pty.master, b, 0, 64000);
- return b.toString('utf8', 0, bytes);
-}
-
-// make sure raw pty is at x=0 and has no pending data
-function pty_reset() {
- pty_write_read('\r\n');
-}
-
-/* debug helpers */
-// generate colorful noisy output to compare xterm and emulator cell states
-function formatError(in_, out_, expected) {
- function addLineNumber(start, color) {
- var counter = start || 0;
- return function(s) {
- counter += 1;
- return '\x1b[33m' + (' ' + counter).slice(-2) + color + s;
- }
- }
- var line80 = '12345678901234567890123456789012345678901234567890123456789012345678901234567890';
- var s = '';
- s += '\n\x1b[34m' + JSON.stringify(in_);
- s += '\n\x1b[33m ' + line80 + '\n';
- s += out_.split('\n').map(addLineNumber(0, '\x1b[31m')).join('\n');
- s += '\n\x1b[33m ' + line80 + '\n';
- s += expected.split('\n').map(addLineNumber(0, '\x1b[32m')).join('\n');
- return s;
-}
-
-// simple debug output of terminal cells
-function terminalToString(term) {
- var result = '';
- var line_s = '';
- for (var line=0; line<term.rows; ++line) {
- line_s = '';
- for (var cell=0; cell<term.cols; ++cell) {
- line_s += term.lines[line][cell][1];
- }
- // rtrim empty cells as xterm does
- line_s = line_s.replace(/\s+$/, '');
- result += line_s;
- result += '\n';
- }
- return result;
-}
-
-/** tests */
-describe('xterm output comparison', function() {
- var xterm;
-
- beforeEach(function () {
- xterm = new Terminal(COLS, ROWS);
- xterm.refresh = function() {};
- });
-
- // omit stack trace for escape sequence files
- Error.stackTraceLimit = 0;
- var files = glob.sync('test/escape_sequence_files/*.in');
- // only successful tests for now
- var successful = [0, 2, 6, 12, 13, 18, 20, 22, 27, 28];
- for (var a in successful) {
- var i = successful[a];
- (function(filename){
- it(filename.split('/').slice(-1)[0], function () {
- pty_reset();
- var in_file = fs.readFileSync(filename, 'utf8');
- var from_pty = pty_write_read(in_file);
- // uncomment this to get log from terminal
- console.log = function(){};
- xterm.write(from_pty);
- var from_emulator = terminalToString(xterm);
- console.log = CONSOLE_LOG;
- var expected = fs.readFileSync(filename.split('.')[0] + '.text', 'utf8');
- if (from_emulator != expected) {
- // uncomment to get noisy output
- //throw new Error(formatError(in_file, from_emulator, expected));
- throw new Error('mismatch');
- }
- });
- })(files[i]);
- }
-});
-
+++ /dev/null
-All tests are made for 80x25 terminal. Make sure to run tests with 80x25.
-
-Create .text files from xterm (expected output)
-- open xterm
-- resize xterm to 80x25
-- run `python run_tests.py`
-- copy & paste whole window output into editor
-- add 26th empty line (due to line handling in toString) - not a bug, a feature ;)
-- advance to next test with ^D
-
-
-Known problems
-##############
-
-
-t0031-HBP:
- - no documentation at all about CSIj found - skipping
-
-t0050-ICH:
- - bug in xterm? (cant ICH last real char, always sticks to last col)
- - text used from https://github.com/MarkLodato/vt100-parser/blob/master/test/t0050-ICH.text
+++ /dev/null
- !"#$%&'()*+,-./
-0123456789:;<=>?
-@ABCDEFGHIJKLMNO
-PQRSTUVWXYZ[\]^_
-`abcdefghijklmno
-pqrstuvwxyz{|}~
+++ /dev/null
- !"#$%&'()*+,-./
-0123456789:;<=>?
-@ABCDEFGHIJKLMNO
-PQRSTUVWXYZ[\]^_
-`abcdefghijklmno
-pqrstuvwxyz{|}~
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-
-!
-"
-#
-$
-%
-&
-'
-(
-)
-*
-+
-,
--
-.
-/
-0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-:
-;
-<
-=
->
-?
-@
-A
-B
-C
-D
-E
-F
-G
-H
-I
-J
-K
-L
-M
-N
-O
-P
-Q
-R
-S
-T
-U
-V
-W
-X
-Y
-Z
-[
-\
-]
-^
-_
-`
-a
-b
-c
-d
-e
-f
-g
-h
-i
-j
-k
-l
-m
-n
-o
-p
-q
-r
-s
-t
-u
-v
-w
-x
-y
-z
-{
-|
-}
-~
+++ /dev/null
-g
-h
-i
-j
-k
-l
-m
-n
-o
-p
-q
-r
-s
-t
-u
-v
-w
-x
-y
-z
-{
-|
-}
-~
-
+++ /dev/null
-abcdefghijklmnopqrstuvwxyz0123456789
\ No newline at end of file
+++ /dev/null
-abcdefghijklmnopqrstuvwxyz0123456789
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-a
-ab
-abc
-abcd
-abcde
-abcdef
-abcdefg
-abcdefgh
-abcdefghi
-abcdefghij
-abcdefghijk
-abcdefghijkl
-abcdefghijklm
-abcdefghijklmn
-abcdefghijklmno
-abcdefghijklmnop
-abcdefghijklmnopq
-abcdefghijklmnopqr
-abcdefghijklmnopqrs
-abcdefghijklmnopqrst
-abcdefghijklmnopqrstu
-abcdefghijklmnopqrstuv
-abcdefghijklmnopqrstuvw
-abcdefghijklmnopqrstuvwx
-abcdefghijklmnopqrstuvwxy
-abcdefghijklmnopqrstuvwxyz
-abcdefghijklmnopqrstuvwxyzA
-abcdefghijklmnopqrstuvwxyzAB
-abcdefghijklmnopqrstuvwxyzABC
-abcdefghijklmnopqrstuvwxyzABCD
-abcdefghijklmnopqrstuvwxyzABCDE
-abcdefghijklmnopqrstuvwxyzABCDEF
-abcdefghijklmnopqrstuvwxyzABCDEFG
-abcdefghijklmnopqrstuvwxyzABCDEFGH
-abcdefghijklmnopqrstuvwxyzABCDEFGHI
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJ
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJK
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLM
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQ
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQR
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345678
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890a
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890ab
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abc
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcd
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdef
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghij
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijk
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijkl
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmn
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqr
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqrs
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqrst
+++ /dev/null
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890a
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890ab
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abc
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcd
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdef
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghij
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijk
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijkl
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmn
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-r
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-rs
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-rst
-
+++ /dev/null
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
+++ /dev/null
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-
+++ /dev/null
-a
-b
-c
-d
-e
-f
-g
-h
-i
-j
-k
-l
-m
-n
-o
-p
-q
-r
-s
-t
-u
-v
-w
-x
-y
-z
-A
-B
-C
-D
-E
-F
-G
-H
-I
-J
-K
-L
-M
-N
-O
-P
-Q
-R
-S
-T
-U
-V
-W
-X
-Y
-Z
-0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-0
-a
-b
-c
-d
-e
-f
-g
-h
-i
-j
-k
-l
-m
-n
-o
-p
-q
-r
-s
-t
+++ /dev/null
-7
-8
-9
-0
-a
-b
-c
-d
-e
-f
-g
-h
-i
-j
-k
-l
-m
-n
-o
-p
-q
-r
-s
-t
-
+++ /dev/null
-1\rx
- 2\rx
- 3\rx
- 4\rx
- 5\rx
- 6\rx
- 7\rx
\ No newline at end of file
+++ /dev/null
-x
-x2
-x 3
-x 4
-x 5
-x 6
-x 7
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
- b\ra\r
+++ /dev/null
-a b
-a b
-a b
-a b
-a b
-a b
-a b
-a b
-a b
-a b
-a b
-a b
-a b
-a b
-a b
-a b
-a b
-a b
-a b
-a b
-
-a
-
-ab
-
+++ /dev/null
-a\eDb\eDc\eDd\eDe\eDf\eDg\eDh\eDi\eDj\eDk\eDl\eDm\eDn\eDo\eDp\eDq\eDr\eDs\eDt\eDu\eDv\eDw\eDx\eDy\eDz\eDA\eDB\eDC\eDD\eDE\eDF\eDG\eDH\eDI\eDJ\eDK\eDL\eDM\eDN\eDO\eDP\eDQ\eDR\eDS\eDT\eDU\eDV\eDW\eDX\eDY\eDZ\eD0\eD1\eD2\eD3\eD4\eD5\eD6\eD7\eD8\eD9\eD0\eDa\eDb\eDc\eDd\eDe\eDf\eDg\eDh\eDi\eDj\eDk\eDl\eDm\eDn\eDo\eDp\eDq\eDr\eDs\eDt
+++ /dev/null
- 7
- 8
- 9
- 0
- a
- b
- c
- d
- e
- f
- g
- h
- i
- j
- k
- l
- m
- n
- o
- p
- q
- r
- s
- t
-
+++ /dev/null
-0 space:
-1 space:
-2 space:
-3 space:
-70 space:
-71 space:
-72 space:
-73 space:
+++ /dev/null
-0 space:
-1 space:
-2 space:
-3 space:
-70 space:
-71 space:
-72 space:
-
-73 space:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-abcdefghijklmnopqrstuvwxyz\b\b\b\b\b\b!
-abc\b\b\b\b\b\b@
-\b#
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\b\b\b\b\b\b$
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\b\b\b\b\b\b%
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqr\b\b\b\b\b\b^
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqrs\b\b\b\b\b\b&
+++ /dev/null
-abcdefghijklmnopqrst!vwxyz
-@bc
-#
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghij$lmnop
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghij%lmnopq
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-^
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-&s
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-a\eEab\eEabc\eEabcd\eEabcde\eEabcdef\eEabcdefg\eEabcdefgh\eEabcdefghi\eEabcdefghij\eEabcdefghijk\eEabcdefghijkl\eEabcdefghijklm\eEabcdefghijklmn\eEabcdefghijklmno\eEabcdefghijklmnop\eEabcdefghijklmnopq\eEabcdefghijklmnopqr\eEabcdefghijklmnopqrs\eEabcdefghijklmnopqrst\eEabcdefghijklmnopqrstu\eEabcdefghijklmnopqrstuv\eEabcdefghijklmnopqrstuvw\eEabcdefghijklmnopqrstuvwx\eEabcdefghijklmnopqrstuvwxy\eEabcdefghijklmnopqrstuvwxyz\eEabcdefghijklmnopqrstuvwxyzA\eEabcdefghijklmnopqrstuvwxyzAB\eEabcdefghijklmnopqrstuvwxyzABC\eEabcdefghijklmnopqrstuvwxyzABCD\eEabcdefghijklmnopqrstuvwxyzABCDE\eEabcdefghijklmnopqrstuvwxyzABCDEF\eEabcdefghijklmnopqrstuvwxyzABCDEFG\eEabcdefghijklmnopqrstuvwxyzABCDEFGH\eEabcdefghijklmnopqrstuvwxyzABCDEFGHI\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJ\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJK\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKL\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLM\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQ\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQR\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345678\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890a\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890ab\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abc\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcd\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdef\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghij\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijk\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijkl\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmn\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqr\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqrs\eEabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqrst
+++ /dev/null
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890a
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890ab
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abc
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcd
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdef
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghij
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijk
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijkl
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmn
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-r
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-rs
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-rst
-
+++ /dev/null
-a
-b
-c
-d\eMe\eMf\eMg
-h
-i
-j....................................................................k\eMl\eMm\eMn
-
-
-
+++ /dev/null
-a g n
-h f m
-ie l
-j....................................................................k
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-And the third.\r
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-This should be the last line.\r
-This one should be lost.\r
-This one's a goner, too.\r\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eMThis is second line.\r\eMThis should be the first line.\r
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-This should be the first line.
-This is second line.
-And the third.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-This should be the last line.
-This one should be lost.
+++ /dev/null
-a\vb\vc\vd\ve\vf\vg\vh\vi\vj\vk\vl\vm\vn\vo\vp\vq\vr\vs\vt\vu\vv\vw\vx\vy\vz\vA\vB\vC\vD\vE\vF\vG\vH\vI\vJ\vK\vL\vM\vN\vO\vP\vQ\vR\vS\vT\vU\vV\vW\vX\vY\vZ\v0\v1\v2\v3\v4\v5\v6\v7\v8\v9\v0\va\vb\vc\vd\ve\vf\vg\vh\vi\vj\vk\vl\vm\vn\vo\vp\vq\vr\vs\vt\r\v
\ No newline at end of file
+++ /dev/null
- 7
- 8
- 9
- 0
- a
- b
- c
- d
- e
- f
- g
- h
- i
- j
- k
- l
- m
- n
- o
- p
- q
- r
- s
- t
-
+++ /dev/null
-a\fb\fc\fd\fe\ff\fg\fh\fi\fj\fk\fl\fm\fn\fo\fp\fq\fr\fs\ft\fu\fv\fw\fx\fy\fz\fA\fB\fC\fD\fE\fF\fG\fH\fI\fJ\fK\fL\fM\fN\fO\fP\fQ\fR\fS\fT\fU\fV\fW\fX\fY\fZ\f0\f1\f2\f3\f4\f5\f6\f7\f8\f9\f0\fa\fb\fc\fd\fe\ff\fg\fh\fi\fj\fk\fl\fm\fn\fo\fp\fq\fr\fs\ft\r\f
+++ /dev/null
- 8
- 9
- 0
- a
- b
- c
- d
- e
- f
- g
- h
- i
- j
- k
- l
- m
- n
- o
- p
- q
- r
- s
- t
-
-
+++ /dev/null
-abcd\18Defgh\r
-abcd\e\18Defgh\r
-abcd\e!\18Defgh\r
-abcd\e!*\18Defgh\r
-abcd\e[\18Defgh\r
-abcd\e[!\18Defgh\r
-abcd\e[2\18Defgh\r
-abcd\e[*2;\18Defgh\r
+++ /dev/null
-abcdDefgh
-abcdDefgh
-abcdDefgh
-abcdDefgh
-abcdDefgh
-abcdDefgh
-abcdDefgh
-abcdDefgh
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-abcd\1aDefgh\r
-abcd\e\1aDefgh\r
-abcd\e!\1aDefgh\r
-abcd\e!*\1aDefgh\r
-abcd\e[\1aDefgh\r
-abcd\e[!\1aDefgh\r
-abcd\e[2\1aDefgh\r
-abcd\e[*2;\1aDefgh\r
+++ /dev/null
-abcdDefgh
-abcdDefgh
-abcdDefgh
-abcdDefgh
-abcdDefgh
-abcdDefgh
-abcdDefgh
-abcdDefgh
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-Hello\e[SGoodbye
-
-Up\e[3SDown
-x
-\e[2S
------------------------------------------------------------------------------\e[Sx
-------------------------------------------------------------------------------\e[Sx
--------------------------------------------------------------------------------\e[Sx
---------------------------------------------------------------------------------\e[Sx
----------------------------------------------------------------------------------\e[Sx
-.............................................................................\e[S\bx
-..............................................................................\e[S\bx
-...............................................................................\e[S\bx
-................................................................................\e[S\bx
-.................................................................................\e[S\bx
-\e[30S
-The End.
+++ /dev/null
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-The End.
-
-
-
-
-
+++ /dev/null
-A
- B
- C
- D
- E
- F
- G
- H
- I
- J
- K
- L
- M
- N
- O
- P
- Q
- R
- S
- T
- U
- V
- W
- X\e[3S
-a
- b
- c
- d
- e\e[3T
- f
- g
- h
-------------------------------------------------------------------------------\e[T1
-
-
--------------------------------------------------------------------------------\e[T2
-
-
---------------------------------------------------------------------------------\e[T3
-
-
----------------------------------------------------------------------------------\e[T4
-
-
-..............................................................................\e[T\b5
-
-
-...............................................................................\e[T\b6
-
-
-................................................................................\e[T\b7
-
-
-.................................................................................\e[T\b8
+++ /dev/null
-
-
-a
- b
- f
- g
- h 1
-
- 2
-
-
-3
-
-
--4------------------------------------------------------------------------------
-
- 5
-
- 6
-
- 7
-
-
-8...............................................................................
-
+++ /dev/null
-abcdefg\e[Chijkl
-abcdefg\e[10Chijkl
-abcdefg\e[10;3Chijkl
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno\e[C@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\e[C@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\e[C@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqr\e[C@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[3C@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[4C@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[5C@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[6C@
-\e[79Cx
-\e[80Cx
-abcd\e[10C
+++ /dev/null
-abcdefg hijkl
-abcdefg hijkl
-abcdefg hijkl
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno @
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-r @
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
- x
- x
-abcd
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-abcdefg\e[D!@
-abcdefg\e[10D!@
-abcdefg\e[2;3D!@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno\e[D@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\e[D@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\e[D@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqr\e[D@
-\e[Dx
+++ /dev/null
-abcdef!@
-!@cdefg
-abcde!@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmn@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno@q
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-@
-x
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-a
-b
-c
-d\e[Ae\e[Af\e[Ag
-h
-i
-j....................................................................k\e[Al\e[Am\e[An
-
-
-
-
-
-
-
-
-
-
-
-\e[0A0\e[1A1\e[2A2\e[3;5A3
-
-
-
-
-
-
+++ /dev/null
-a g n
-h f m
-ie l
-j....................................................................k
-
- 3
-
-
- 2
-
- 1
-0
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-This is the first line.\r
-This is the second line.\r
-And the third.\r
-This line should be deleted.\r
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Penultimate line.\r
-This should be the last line.\r\e[36AI have gone up all the way...\r
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-I have gone up all the way...
-This line should be deleted.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Penultimate line.
-This should be the last line.
+++ /dev/null
-a\r
-b\r
-c\r
-d\r
-e\r
-f\r
-g\r
-h\r
-i\r
-j\r
-k\r
-l\r
-m\r
-n\r
-o\r
-p\r
-q\r
-r\r
-s\r
-t\r
-u\r
-v\r
-w\r
-x\e[23A0\e[B1\e[0B2\e[1B3\e[2B4\e[3;5B5\e[100BBottom line.\r\e[8A\e[78CA\e[BB\e[BC\e[BD\e[BE\r\e[6B\r
+++ /dev/null
-b 1
-c 2
-d 3
-e
-f 4
-g
-h
-i 5
-j
-k
-l
-m
-n
-o
-p
-q A
-r B
-s C
-t D
-u E
-v
-w
-x
- Bottom line.
-
+++ /dev/null
-\e[Ha\e[2;3Hb\e[;4Hc\e[10;10Hd\e[5He\e[40;16Hf\e[20;100Hg\e[100;200H
+++ /dev/null
- b
-
-
-e
-
-
-
-
- d
-
-
-
-
-
-
-
-
-
- g
-
-
-
-
- f
-
+++ /dev/null
-abc\e[Edef\e[5Eghi\r\r
--------------------------------------------------------------------------abcdefg\e[Ehij\e[100Elast line\r
+++ /dev/null
-def
-
-
-
-
-ghi
--------------------------------------------------------------------------abcdefg
-hij
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-last line
-
+++ /dev/null
-erased\e[Freplacement
-
-
-line four\e[2Fline two
-
-
+++ /dev/null
-replacement
-line two
-
-line four
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-abcdefg\e[ahijkl
-abcdefg\e[10ahijkl
-abcdefg\e[10;3ahijkl
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno\e[a@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\e[a@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\e[a@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqr\e[a@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[3a@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[4a@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[5a@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm\e[6a@
-\e[79ax
-\e[80ax
-abcd\e[10a
+++ /dev/null
-abcdefg hijkl
-abcdefg hijkl
-abcdefg hijkl
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno @
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-r @
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklm @
- x
- x
-abcd
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-abcdefg\e[j!@
-abcdefg\e[10j!@
-abcdefg\e[2;3j!@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno\e[j@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\e[j@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\e[j@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqr\e[j@
-\e[jx
+++ /dev/null
-abcdefg!@
-abcdefg!@
-abcdefg!@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmno@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq
-r@
-x
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-a
-b
-c
-d\e[ke\e[kf\e[kg
-h
-i
-j....................................................................k\e[kl\e[km\e[kn
-
-
-
-
-
-
-
-
-
-
-
-\e[0k0\e[1k1\e[2k2\e[3;5k3
-
-
-
-
-
-
+++ /dev/null
-b
-c
-defg
-h
-i
-j....................................................................klmn
-
-
-
-
-
-
-
-
-
-
-
-0123
-
-
-
-
-
-
-
+++ /dev/null
-This is the first line.\r
-This is the second line.\r
-And the third.\r
-This line should be deleted.\r
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Penultimate line.\r
-This should be the last line.\r\e[36kI have gone up all the way...\r
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-I have gone up all the way...
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-a\r
-b\r
-c\r
-d\r
-e\r
-f\r
-g\r
-h\r
-i\r
-j\r
-k\r
-l\r
-m\r
-n\r
-o\r
-p\r
-q\r
-r\r
-s\r
-t\r
-u\r
-v\r
-w\r
-x\e[23A0\e[e1\e[0e2\e[1e3\e[2e4\e[3;5e5\e[100eBottom line.\r\e[8A\e[78CA\e[eB\e[eC\e[eD\e[eE\r\e[6e\r
+++ /dev/null
-b 1
-c 2
-d 3
-e
-f 4
-g
-h
-i 5
-j
-k
-l
-m
-n
-o
-p
-q A
-r B
-s C
-t D
-u E
-v
-w
-x
- Bottom line.
-
+++ /dev/null
-\e[fa\e[2;3fb\e[;4fc\e[10;10fd\e[5fe\e[40;16ff\e[20;100fg\e[100;200f
+++ /dev/null
- b
-
-
-e
-
-
-
-
- d
-
-
-
-
-
-
-
-
-
- g
-
-
-
-
- f
-
+++ /dev/null
-x\e[5b
-\e[3b<
-abcdefg\e[3D\e[b
-abcdefg\e[3D\e[b!
- @\e[20b
- .\e[4b
- ?\e[0b-
+++ /dev/null
-xxxxxx
-<
-abcdefg
-abcd!fg
- @@@@@@@@@
-@@@@@@@@@@@@
- .
-....
- ?
-?-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-abcdefghijklmnopqrstuvwxyz\b\b\b\b\b\e[15@
-abcdefghijklmnopqrstuvwxyz\b\b\b\b\b\e[80@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[17@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[18@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[19@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[20@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[21@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\e[5@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\e[5@
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\e[5@
-ICH at end:\e[5@
-
-abcdefghijklmnopqrstuvwxyz\b\b\b\b\b\e[15@!@#
-abcdefghijklmnopqrstuvwxyz\b\b\b\b\b\e[80@!@#
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[17@!@#
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[18@!@#
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[19@!@#
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[20@!@#
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\b\b\e[21@!@#
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop\e[5@!@#
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\e[5@!@#
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopq\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\e[5@!@#
-ICH at end:\e[5@!@#
+++ /dev/null
-abcdefghijklmnopqrstu
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567 89
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567 89
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567 8
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ01234567890abcdefghijkl
-ICH at end:
-
-abcdefghijklmnopqrstu!@# vwxyz
-abcdefghijklmnopqrstu!@#
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567!@# 89
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567!@# 89
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567!@# 8
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567!@#
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567!@#
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop!
-@#
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnop!
-@#
-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW!@# XYZ01234567890abcdefghijkl
-ICH at end:!@#
-
+++ /dev/null
-ab\r
-cd\r
-ef\r
-gh\r
-ij\r
-kl\r
-mn\r
-op\e[2A\e[LQR\e[3A\e[4LST\e[10B\r
-1\r
-2\r
-3\r
-4\r
-5\e[A------------------------------------------------------------------------------a\e[Lb\e[2B\r\r
-6\r
-7\r
-8\r
-9\r
-10\r
-11\r
-12\r
-13\r
-14\r
-15\e[4A\e[3L\e[100B\r
+++ /dev/null
-
-ef
-gh
-ij
-QR
-kl
-mn
-op
-1
-2
-3
-b
-4------------------------------------------------------------------------------a
-5
-6
-7
-8
-9
-10
-
-
-
-11
-12
-
+++ /dev/null
-a
-b
-c
-d
-e
-f
-g
-h\e[4A\e[2Mijklmnop\r
-
-
-1
-2
-3
-4\e[2A\r\e[79C\e[Mx\r
-
+++ /dev/null
-a
-b
-c
-ijklmnop
-g
-h
-1
-x
-4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-abcdefghijklmnopqrstuvwxyz\e[8D>\e[2P
-abcdefghijklmnopqrstuvwxyz\e[8D>\e[2P!
-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[80D>\e[10P!
-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D>\e[10P!
-------------------------------------------------------------------------------\e[P?
--------------------------------------------------------------------------------\e[P?
--------------------------------------------------------------------------------\e[P?
----------------------------------------------------------------------------------\e[P?
-..............................................................................\e[P
-...............................................................................\e[P
-...............................................................................\e[P
-.................................................................................\e[P
+++ /dev/null
-abcdefghijklmnopqr>vwxyz
-abcdefghijklmnopqr>!wxyz
->!mnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh
-abcdefghijklmnopqrstuvwxyz0123456789ABC>!PQRSTUVWXYZ0123456789abcdefgh
-------------------------------------------------------------------------------?
--------------------------------------------------------------------------------?
--------------------------------------------------------------------------------?
---------------------------------------------------------------------------------
--?
-..............................................................................
-...............................................................................
-...............................................................................
-................................................................................
-.
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-abcdefghijklmnopqrstuvwxyz\e[8D>\e[2X
-abcdefghijklmnopqrstuvwxyz\e[8D>\e[2X!
-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[80D>\e[10X!
-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D>\e[10X!
-------------------------------------------------------------------------------\e[X?
--------------------------------------------------------------------------------\e[X?
--------------------------------------------------------------------------------\e[X?
----------------------------------------------------------------------------------\e[X?
-..............................................................................\e[X
-...............................................................................\e[X
-...............................................................................\e[X
-.................................................................................\e[X
+++ /dev/null
-abcdefghijklmnopqr> vwxyz
-abcdefghijklmnopqr>! vwxyz
->! lmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh
-abcdefghijklmnopqrstuvwxyz0123456789ABC>! OPQRSTUVWXYZ0123456789abcdefgh
-------------------------------------------------------------------------------?
--------------------------------------------------------------------------------?
--------------------------------------------------------------------------------?
---------------------------------------------------------------------------------
--?
-..............................................................................
-...............................................................................
-...............................................................................
-................................................................................
-.
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D><\b\e[K
-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D><\b\e[0K
-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D><\b\e[1K
-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D><\b\e[2K
-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D><\b\e[K!
-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D><\b\e[1K!
-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[40D><\b\e[2K!
-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh\e[K!
+++ /dev/null
-abcdefghijklmnopqrstuvwxyz0123456789ABC>
-abcdefghijklmnopqrstuvwxyz0123456789ABC>
- FGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh
-
-abcdefghijklmnopqrstuvwxyz0123456789ABC>!
- !FGHIJKLMNOPQRSTUVWXYZ0123456789abcdefgh
- !
-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefg!
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-a
-ab
-abc
-abcd
-abcde
-abcdef
-abcdefg
-abcdefgh
-abcdefghi
-abcdefghij
-abcdefghijk
-abcdefghijkl
-abcdefghijklm
-abcdefghijklmn
-abcdefghijklmno
-abcdefghijklmnop
-abcdefghijklmnopq
-abcdefghijklmnopqr
-abcdefghijklmnopqrs
-abcdefghijklmnopqrst
-abcdefghijklmnopqrstu
-abcdefghijklmnopqrstuv
-abcdefghijklmnopqrstuvw
-abcdefghijklmnopqrstuvwx
-abcdefghijklmnopqrstuvwxy
-abcdefghijklmnopqrstuvwxyz\e[20D\e[5A\e[J\e[10A\e[1J\e[40B
-A
-AB
-ABC
-ABCD
-ABCDE
-ABCDEF
-ABCDEFG
-ABCDEFGH
-ABCDEFGHI
-ABCDEFGHIJ
-ABCDEFGHIJK
-ABCDEFGHIJKL
-ABCDEFGHIJKLM
-ABCDEFGHIJKLMN
-ABCDEFGHIJKLMNO
-ABCDEFGHIJKLMNOP
-ABCDEFGHIJKLMNOPQ
-ABCDEFGHIJKLMNOPQR
-ABCDEFGHIJKLMNOPQRS
-ABCDEFGHIJKLMNOPQRST
-ABCDEFGHIJKLMNOPQRSTU
-ABCDEFGHIJKLMNOPQRSTUV
-ABCDEFGHIJKLMNOPQRSTUVW
-ABCDEFGHIJKLMNOPQRSTUVWX
-ABCDEFGHIJKLMNOPQRSTUVWXY\e[20D\e[2J!
-\e[30B
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\e[3Av\e[B\e[J^
-
-
-
-the end
+++ /dev/null
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- !
-
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaav
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa^
-
-
-
-the end
-
+++ /dev/null
-a
-ab
-abc
-abcd
-abcde
-abcdef
-abcdefg
-abcdefgh
-abcdefghi
-abcdefghij
-abcdefghijk
-abcdefghijkl
-abcdefghijklm
-abcdefghijklmn
-abcdefghijklmno
-abcdefghijklmnop
-abcdefghijklmnopq
-abcdefghijklmnopqr
-abcdefghijklmnopqrs
-abcdefghijklmnopqrst
-abcdefghijklmnopqrstu
-abcdefghijklmnopqrstuv
-abcdefghijklmnopqrstuvw
-abcdefghijklmnopqrstuvwx
-abcdefghijklmnopqrstuvwxy
-abcdefghijklmnopqrstuvwxyz
-A
-AB
-ABC
-ABCD
-ABCDE
-ABCDEF
-ABCDEFG
-ABCDEFGH
-ABCDEFGHI
-ABCDEFGHIJ
-ABCDEFGHIJK
-ABCDEFGHIJKL
-ABCDEFGHIJKLM
-ABCDEFGHIJKLMN
-ABCDEFGHIJKLMNO
-ABCDEFGHIJKLMNOP
-ABCDEFGHIJKLMNOPQ
-ABCDEFGHIJKLMNOPQR
-ABCDEFGHIJKLMNOPQRS
-ABCDEFGHIJKLMNOPQRST
-ABCDEFGHIJKLMNOPQRSTU
-ABCDEFGHIJKLMNOPQRSTUV
-ABCDEFGHIJKLMNOPQRSTUVW
-ABCDEFGHIJKLMNOPQRSTUVWX
-ABCDEFGHIJKLMNOPQRSTUVWXY\e[3J
-this
-is
-the
-end
+++ /dev/null
-Xterm behaves oddly with CSI 3 J. This function is supposed to clear the
-saved lines in history. Xterm does this, but a small number of lines of
-history are not cleared. The number seems to vary with how high the window is
-and how much output has recently been saved. There is no reason to simulate
-this behavior, so the expected outputs are as if the entire history was
-erased.
+++ /dev/null
-ABCDEF
-ABCDEFG
-ABCDEFGH
-ABCDEFGHI
-ABCDEFGHIJ
-ABCDEFGHIJK
-ABCDEFGHIJKL
-ABCDEFGHIJKLM
-ABCDEFGHIJKLMN
-ABCDEFGHIJKLMNO
-ABCDEFGHIJKLMNOP
-ABCDEFGHIJKLMNOPQ
-ABCDEFGHIJKLMNOPQR
-ABCDEFGHIJKLMNOPQRS
-ABCDEFGHIJKLMNOPQRST
-ABCDEFGHIJKLMNOPQRSTU
-ABCDEFGHIJKLMNOPQRSTUV
-ABCDEFGHIJKLMNOPQRSTUVW
-ABCDEFGHIJKLMNOPQRSTUVWX
-ABCDEFGHIJKLMNOPQRSTUVWXY
-this
-is
-the
-end
-
+++ /dev/null
- \e7v 1\e[S\b2
-
-3\e8^
-
-
-
- v\e7
-...\e[Sooo\e8^
-
+++ /dev/null
-
-3
-
- v
-... ^
- ooo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
- \e[sv 1\e[S\b2
-
-3\e[u^
-
-
-
- v\e[s
-...\e[Sooo\e[u^
-
+++ /dev/null
-
-3
-
- v
-... ^
- ooo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-\e[3;7r1
-2
-3
-4
-5
-6
-7
-8
-9\e[78GABCDEF\e[8da
-b
-c
-d
-e
-f
-g
-h
-i
-j
-k
-l
-m
-n
-o
-p
-q
-r
-s
-t
-u\e[78Gvwxyz
-\e[r\e[24d
-The end.
+++ /dev/null
-1
- 2
- 6
- 7
- 8
- 9 ABC
-DEF
- a
- b
- c
- d
- e
- f
- g
- h
- i
- j
- k
- l
- m
- n
- o
- p
-yz qrstu vwx
-The end.
+++ /dev/null
-\e[3;7r1\eD2\eD3\eD4\eD5\eD6\eD7\eD8\eD9\e[78GABCDEF\e[8da\eDb\eDc\eDd\eDe\eDf\eDg\eDh\eDi\eDj\eDk\eDl\eDm\eDn\eDo\eDp\eDq\eDr\eDs\eDt\eDu\e[78Gvwxyz
-\e[r\e[24d
-The end.
+++ /dev/null
- 2
- 6
- 7
- 8
- 9 ABC
-DEF
- a
- b
- c
- d
- e
- f
- g
- h
- i
- j
- k
- l
- m
- n
- o
- p
- q
-The end. rstu vwx
-
+++ /dev/null
-\e[3;7r1\eE2\eE3\eE4\eE5\eE6\eE7\eE8\eE9\e[8da\eEb\eEc\eEd\eEe\eEf\eEg\eEh\eEi\eEj\eEk\eEl\eEm\eEn\eEo\eEp\eEq\eEr\eEs\eEt\eEu\e[r\e[24d
-The end.
+++ /dev/null
-2
-5
-6
-7
-8
-9
- a
-b
-c
-d
-e
-f
-g
-h
-i
-j
-k
-l
-m
-n
-o
-p
-q
-The end.
-
+++ /dev/null
-TOP 1\r
-TOP 2\r
-TOP 3\r
-TOP 4\r
-TOP 5\r
-TOP 6 - GONE\r
-
-
-
-
-
-
-
-
-
-
-
-
-BOTTOM 6 - GONE\r
-BOTTOM 5\r
-BOTTOM 4\r
-BOTTOM 3\r
-BOTTOM 2\r
-BOTTOM 1\e[6;19r
-
-
-
-
-And the third.\r
-
-
-
-
-
-
-
-
-
-
-This should be the last line.\r
-This one should be lost.\r
-This one's a goner, too.\r\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eM\eMThis is second line.\r\eMThis should be the first line.\e[r\e[24d
-The end.\r
+++ /dev/null
-TOP 2
-TOP 3
-TOP 4
-TOP 5
-This should be the first line.
-This is second line.
-And the third.
-
-
-
-
-
-
-
-
-
-
-This should be the last line.
-BOTTOM 5
-BOTTOM 4
-BOTTOM 3
-BOTTOM 2
-BOTTOM 1
-The end.
-
+++ /dev/null
-a
-b
-c
-d
-e
-f
-g
-h
-i
-j
-k
-l
-m
-n
-o
-p
-q
-r
-s
-t
-u
-v
-w
-x\e[5;9r\e[S\e[14;22r\e[3T\e[r\e[24d
+++ /dev/null
-a
- b
- c
- d
- f
- g
- h
- i
-
- j
- k
- l
- m
-
-
-
- n
- o
- p
- q
- r
- s
- w
- x
+++ /dev/null
-a
-b
-c
-d
-e
-f
-g
-h
-i
-j
-k
-l
-m
-n
-o
-p
-q
-r
-s
-t
-u
-v
-w
-x\e[10;19r\e[25B1\e[24d\e[25A2\e[r\e[24d
+++ /dev/null
-a
-b
-c
-d
-e
-f
-g
-h
-i
-j2
-k
-l
-m
-n
-o
-p
-q
-r
-1
-t
-u
-v
-w
-x
-
+++ /dev/null
- 1 (IL on line 2, expect nothing)
- 2 (DL on line 22, expect nothing)
- 3 vvvv IL on line 5, expected: A_BC
- 4 A
- 5 B
- 6 C
- 7 D
- 8 ^^^^
- 9 vvvv DL on line 11, expected: ACD_
-10 A
-11 B
-12 C
-13 D
-14 ^^^^
-15 vvvv IL on line 17, expected: A_
-16 A
-17 B
-18 ^^^^
-19 vvvv IL on line 21, expected: A_
-20 A
-21 B
-22 ^^^^
-23 vvvv IL on line 24, expected: _A
-24 A\e[4;7r
-\e[L\e[22d\e[M\e[5d\e[L\e[10;13r\e[11d\e[M\e[16;17r\e[17d\e[L\e[20;21r\e[21d\e[M\e[r\e[24d
-25 B
-26 ^^^^
-27 vvvv DL on line 28, expected: B_
-28 A
-29 B
-30 ^^^^
-31
-32\e[16;17r\e[16d\e[L\e[20;21r\e[20d\e[M\e[r\e[24d
+++ /dev/null
- 8 ^^^^
- 9 vvvv DL on line 11, expected: ACD_
-10 A
-12 C
-13 D
-
-14 ^^^^
-15 vvvv IL on line 17, expected: A_
-16 A
-
-18 ^^^^
-19 vvvv IL on line 21, expected: A_
-20 A
-
-22 ^^^^
-
-23 vvvv IL on line 24, expected: _A
-25 B
-26 ^^^^
-28 A
-
-29 B
-30 ^^^^
-31
-32
+++ /dev/null
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24\e[;4r\e[S\e[4;4HA\e[H
-\e[22r\e[S\e[24;5HB\e[H
-\e[6;7;8r\e[S\e[7;6HC\e[H
-\e[15;0r\e[S\e[24;7HD\e[H
-\e[10;10r\e[S\e[24;8HE\e[H
-\e[15;11r\e[S\e[24;9HF\e[H
-\e[23;28r\e[S\e[24;10HG\e[H
-\e[r\e[24d
-Done.
+++ /dev/null
- 3
- 4
- A
- 5
- 7
- C
- 8
- 9
-10
-11
-12
-13
-14
-18
-19
-20
-21
-23
-24
- B
- D
- F
- G
-Done.
-
+++ /dev/null
-a b c d e f g h i j k l
- x
-1 2
- \e[A3\e[B
-
-Tab before EOL:
-no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh@
-tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh @
-tab (2):abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg @
-
-Tab at EOL:
-no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi@
-tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi @
-with clipping: 4567890abcdefghi \eM\eD@
+++ /dev/null
-a b c d e f g h i j k
-l
- x
-1 3 2
-
-
-Tab before EOL:
-no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh@
-tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh@
-tab (2):abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg @
-
-Tab at EOL:
-no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi
-@
-tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi
-@
-with clipping: 4567890abcdefgh@
-
-
-
-
-
-
-
-
+++ /dev/null
-default:
-> 1 2 3 4 5 6 7 8 9 0
-
-clear non-existant: \e[gx \e[gx
-> 1 2 3 4 5 6 7 8 9 0
-
-clear 2 and 4: \e[gx \e[gx
-> 1 3 5 6 7 8 9 0
-
-clear 0: \e[gx
-> 1 3 5 6 7 8 9 0
-
-clear after 0: .\e[gx
-> 1 3 5 6 7 8 9 0
-
-clear all:\e[3g
-> 0done
-
-TBC at end with clipping: ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde\e[g\eM\eD!
+++ /dev/null
-default:
-> 1 2 3 4 5 6 7 8 9 0
-
-clear non-existant: x x
-> 1 2 3 4 5 6 7 8 9 0
-
-clear 2 and 4: x x
-> 1 3 5 6 7 8 9 0
-
-clear 0: x
-> 1 3 5 6 7 8 9 0
-
-clear after 0: .
-x
-> 1 3 5 6 7 8 9 0
-
-clear all:
-> 0
-done
-
-TBC at end with clipping: ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcd!
-
-
-
-
+++ /dev/null
- 1 2 3 4
-abcde\eHFghijklmnopqrstuv\eHWxyz
- H 1 2 W 3 4
-
-HTS at end: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde\eHfgh
- H 1 2 W 3 4 5 6 7 8 9 a b
-
-HTS at end with clipping: ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde\eH\eM\eD!
+++ /dev/null
- 1 2 3 4
-abcdeFghijklmnopqrstuvWxyz
- H 1 2 W 3 4
-
-HTS at end: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcde
-fgh
- H 1 2 W 3 4 5 6 7 8 9 a
-b
-
-HTS at end with clipping: ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcd!
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-a\e[Ib\e[Ic\e[Id\e[Ie\e[If\e[Ig\e[Ih\e[Ii\e[Ij\e[Ik\e[Il
-\e[I\e[I\e[I\e[Ix
-1\e[I2
- \e[A3\e[B
-
-CHT before EOL:
-no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh@
-tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh\e[I@
-tab (2):abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg\e[I@
-
-CHT at EOL:
-no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi@
-tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi\e[I@
-with clipping: 4567890abcdefghi\e[I\eM\eD@
-
-a\e[4Ie\e[2Ig
-\e[4Ie \e[2Ih
-\e[100Ix
+++ /dev/null
-a b c d e f g h i j k
-l
- x
-1 3 2
-
-
-CHT before EOL:
-no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh@
-tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefgh@
-tab (2):abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefg @
-
-CHT at EOL:
-no tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi
-@
-tab: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghi
-@
-with clipping: 4567890abcdefgh@
-
-a e g
- e h
- x
-
-
-
-
+++ /dev/null
-a b c d e f g h i j k
- <\e[ZI\e[Zi\e[2Zh\e[3Zf\e[10Za
-\e[Za
-
-default tab stops:
-near end: abcdefg\e[Z!
-at end: abcdefgh\e[Z!
-at end (2): abcdefgh\e[2Z!
-at end with clipping: abcdefgh\e[Z\eM\eD!
-at end with clipping (2): abcdefgh\e[2Z\eM\eD!
-
-set tab stop at column 80: \eHv
-at end: abcdefgh\e[Z!
-at end (2): abcdefgh\e[2Z!
-at end with clipping: abcdefgh\e[Z\eM\eD!
-at end with clipping (2): abcdefgh\e[2Z\eM\eD!
+++ /dev/null
-a b c d e f g h i j k
-a f h i <
-a
-
-default tab stops:
-near end: !bcdefg
-at end: abcdefgh
-!
-at end (2): abcdefgh
-!
-at end with clipping: !bcdefgh
-at end with clipping (2): ! abcdefgh
-
-set tab stop at column 80: v
-at end: abcdefgh
-!
-at end (2): abcdefgh
-!
-at end with clipping: !bcdefgh
-at end with clipping (2): ! abcdefgh
-
-
-
-
-
+++ /dev/null
-a b c d e f g h i j k
-a f h i <
-a
-
-default tab stops:
-near end: !bcdefg
-at end: abcdefgh
-!
-at end (2): abcdefgh
-!
-at end with clipping: !bcdefgh
-at end with clipping (2): ! abcdefgh
-
-set tab stop at column 80: v
-at end: abcdefgh
-!
-at end (2): abcdefgh
-!
-at end with clipping: !bcdefgh
-at end with clipping (2): ! abcdefgh
+++ /dev/null
-a\e[?47h
-b
-c
-d
-e
-f
-g
-h
-i
-j
-k
-l
-m
-n
-o
-p
-q
-r
-s
-t
-u
-v
-w
-x
-y\e[?47lz
-A\e[?47h
-B
-C
-D
-E
-F
-G
-H
-I
-J
-K
-L
-M
-N
-O
-P
-Q
-R
-S
-T
-U
-V
-W
-X
-Y\e[?47lZ
- --->\e[?47hhello\e[?47l<--
-
- --->\e[?47h\e[?47l<---
-
-fin
+++ /dev/null
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- z
-AZ
- <-- --->
-
- --->
-<---
-
-fin
-
+++ /dev/null
-a
-b
-c
-d
-e
-f
-g
-h
-i
-j
-k
-l
-m
-n
-o
-p
-q
-r
-s
-t
-u
-v
-w
-x
-y
-z
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-\e[?47h
-one
-two
-three
-four
-five
-six
-\e[3J
-\e[?47l
-11
+++ /dev/null
- n
- o
- p
- q
- r
- s
- t
- u
- v
- w
- x
- y
- z
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
-
- 11
+++ /dev/null
-a
- b\e7
- c\e[?47h
-
- >\e7
-
- \e[5Sxxxxxxx\e8\e[?47l!\e8<
-
-
-
-
-
-
-
-The end.
+++ /dev/null
-a
- b<
- c
-
- !
-
-
-
-
-The end.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
--------- insert single '!' --------------------------------------------abcdefghi
-jklmnop\e[1;75H\e[4h!\e[4l
-
-
--------- insert 0-9, with wraparound ----------------------------------abcdefghi
-jklmnop\e[4;75H\e[4h0123456789\e[4l
-
--------- repeat 3 '!' -------------------------------------------------abcdefghi
-jklmnop\e[7;75H\e[4h!\e[2b\e[4l
-
-
--------- repeat 10 '!', with wraparound -------------------------------abcdefghi
-jklmnop\e[10;75H\e[4h!\e[9b\e[4l
+++ /dev/null
--------- insert single '!' --------------------------------------------abc!defgh
-jklmnop
-
--------- insert 0-9, with wraparound ----------------------------------abc012345
-6789jklmnop
-
--------- repeat 3 '!' -------------------------------------------------abc!!!def
-jklmnop
-
--------- repeat 10 '!', with wraparound -------------------------------abc!!!!!!
-!!!!jklmnop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-a
-b
-c
-d\e[20h
-e
-f\vg\fh
-i\rj\rk\e[20l
-l
-m
-n\vo\fp\r
+++ /dev/null
-a
-b
-c
-d
-e
-f
-g
-h
-k
-l
-m
-n
- o
- p
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
--------- default: wraparound ----------------------------------------------abcdefgh\e[?7h
--------- set: wraparound ----------------------------------------------abcdefgh\e[?7l
--------- unset: no wraparound -------------------------------------------abcdefgh
- this should be immediately below "no wraparound"\e[?7h
+++ /dev/null
--------- default: wraparound ----------------------------------------------abcd
-efgh
--------- set: wraparound ----------------------------------------------abcd
-efgh
--------- unset: no wraparound -------------------------------------------abcd
- this should be immediately below "no wraparound"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-\e[?45ha
-b\b\bA
-
-c\b\b\b-B
-
-d\b\bC!\e[H\b\b\b\b\b\b\bthe endreally!\e[?45l
+++ /dev/null
-c C
-!
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- the end
-really!
-
+++ /dev/null
-<pre>
-Implemented non-color attributes:
-
- 1: This is <span style="font-weight: bold">bold</span>.
-
- 3: This is <span style="font-style: italic">italic</span>.
-
- 4: This is <span style="text-decoration: underline">underlined</span>.
-
- 5: This is <span style="text-decoration: blink">slowly blinking</span>.
-
- 6: This is <span style="text-decoration: blink">rapidly blinking</span>.
-
- 7: This is <span style="background-color: black; color: white">inverse</span>.
-
- 8: This is <span style="visibility: hidden">hidden</span>.
-
- 9: This is <span style="text-decoration: line-through">struck out</span>.
-
-21: This is <span style="text-decoration: underline; border-bottom: 1px solid">double underlined</span>.
-
-53: This is <span style="text-decoration: overline">overlined</span>.
-
-
-
-Unimplemented non-color attributes:
-
- 2: weight:feint
-
-20: style:fraktur
-
-51: frame:box
-
-52: frame:circle
-</pre>
+++ /dev/null
-Implemented non-color attributes:
-
- 1: This is \e[1mbold\e[m.
-
- 3: This is \e[3mitalic\e[m.
-
- 4: This is \e[4munderlined\e[m.
-
- 5: This is \e[5mslowly blinking\e[m.
-
- 6: This is \e[6mrapidly blinking\e[m.
-
- 7: This is \e[7minverse\e[m.
-
- 8: This is \e[8mhidden\e[m.
-
- 9: This is \e[9mstruck out\e[m.
-
-21: This is \e[21mdouble underlined\e[m.
-
-53: This is \e[53moverlined\e[m.
-
-
-
-Unimplemented non-color attributes:
-
- 2: weight:feint
-
-20: style:fraktur
-
-51: frame:box
-
-52: frame:circle
+++ /dev/null
-<pre>
-This is <span style="background-color: black; color: white">inverse text</span> with default fg and bg.
-<span style="color: #cd0000">This is </span><span style="color: white; background-color: #cd0000">inverse text</span><span style="color: #cd0000"> with red fg and default bg.</span>
-<span style="background-color: #cd0000">This is </span><span style="background-color: black; color: #cd0000">inverse text</span><span style="background-color: #cd0000"> with default fg and red bg.</span>
-<span style="background-color: #cd0000; color: #00cd00">This is </span><span style="background-color: #00cd00; color: #cd0000">inverse text</span><span style="background-color: #cd0000; color: #00cd00"> with green fg and red bg.</span>
-</pre>
+++ /dev/null
-This is \e[7minverse text\e[27m with default fg and bg.
-\e[31mThis is \e[7minverse text\e[27m with red fg and default bg.\e[m
-\e[41mThis is \e[7minverse text\e[27m with default fg and red bg.\e[m
-\e[32;41mThis is \e[7minverse text\e[27m with green fg and red bg.\e[m
+++ /dev/null
-Script started on Fri 27 Mar 2009 08:53:29 PM EDT
-dircolors: /etc/DIR_COLORS: No such file or directory\r
-\e]0;mark@mark-desktop:~/vt100-to-html\amark@mark-desktop:~/vt100-to-html$ bcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST \rUVWXYZ1234567890abcdefghijklmnopqrstuv\e[A\b\b\bcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV\e[1PWXYZ1234567890abcdefghijklmnopqrstuv\e[A\b\b\r
-\r\r
-\e]0;mark@mark-desktop:~/vt100-to-html\amark@mark-desktop:~/vt100-to-html$ exit\r
-
-Script done on Fri 27 Mar 2009 08:53:33 PM EDT
+++ /dev/null
-Script started on Fri 27 Mar 2009 08:53:29 PM EDT
-dircolors: /etc/DIR_COLORS: No such file or directory
-mark@mark-desktop:~/vt100-to-html$ cdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU
-VWXYZ1234567890abcdefghijklmnopqrstuv
-mark@mark-desktop:~/vt100-to-html$ exit
-
-Script done on Fri 27 Mar 2009 08:53:33 PM EDT
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-Script started on Sun 17 May 2009 06:20:41 PM EDT
-dircolors: /etc/DIR_COLORS: No such file or directory
-\e]0;mark@mark-desktop:~/vt100-to-html/scripts\amark@mark-desktop:~/vt100-to-html/scripts$ ls
-bash.script
-\e]0;mark@mark-desktop:~/vt100-to-html/scripts\amark@mark-desktop:~/vt100-to-html/scripts$ ls /
-bin dev initrd.img lib64 opt selinux usr
-boot etc initrd.img.old lost+found proc srv var
-boot2 home lib media root sys vmlinuz
-cdrom initrd lib32 mnt sbin tmp vmlinuz.old
-\e]0;mark@mark-desktop:~/vt100-to-html/scripts\amark@mark-desktop:~/vt100-to-html/scripts$ exit
-
-Script done on Sun 17 May 2009 06:20:52 PM EDT
+++ /dev/null
-Script started on Sun 17 May 2009 06:20:41 PM EDT
-dircolors: /etc/DIR_COLORS: No such file or directory
-mark@mark-desktop:~/vt100-to-html/scripts$ ls
-bash.script
-mark@mark-desktop:~/vt100-to-html/scripts$ ls /
-bin dev initrd.img lib64 opt selinux usr
-boot etc initrd.img.old lost+found proc srv var
-boot2 home lib media root sys vmlinuz
-cdrom initrd lib32 mnt sbin tmp vmlinuz.old
-mark@mark-desktop:~/vt100-to-html/scripts$ exit
-
-Script done on Sun 17 May 2009 06:20:52 PM EDT
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-Script started on Sun 17 May 2009 06:21:05 PM EDT
-dircolors: /etc/DIR_COLORS: No such file or directory
-\e]0;mark@mark-desktop:~/vt100-to-html/scripts\amark@mark-desktop:~/vt100-to-html/scripts$ ls --color=auto /
-\e[00m\e[01;34mbin\e[00m \e[01;34mdev\e[00m \e[01;36minitrd.img\e[00m \e[01;36mlib64\e[00m \e[01;34mopt\e[00m \e[01;34mselinux\e[00m \e[01;34musr\e[00m
-\e[01;34mboot\e[00m \e[01;34metc\e[00m \e[01;36minitrd.img.old\e[00m \e[01;34mlost+found\e[00m \e[01;34mproc\e[00m \e[01;34msrv\e[00m \e[01;34mvar\e[00m
-\e[01;34mboot2\e[00m \e[01;34mhome\e[00m \e[01;34mlib\e[00m \e[01;34mmedia\e[00m \e[01;34mroot\e[00m \e[01;34msys\e[00m \e[01;36mvmlinuz\e[00m
-\e[01;36mcdrom\e[00m \e[01;34minitrd\e[00m \e[01;34mlib32\e[00m \e[01;34mmnt\e[00m \e[01;34msbin\e[00m \e[30;42mtmp\e[00m \e[01;36mvmlinuz.old\e[00m
-\e[m\e]0;mark@mark-desktop:~/vt100-to-html/scripts\amark@mark-desktop:~/vt100-to-html/scripts$ exit
-
-Script done on Sun 17 May 2009 06:21:11 PM EDT
+++ /dev/null
-Script started on Sun 17 May 2009 06:21:05 PM EDT
-dircolors: /etc/DIR_COLORS: No such file or directory
-mark@mark-desktop:~/vt100-to-html/scripts$ ls --color=auto /
-bin dev initrd.img lib64 opt selinux usr
-boot etc initrd.img.old lost+found proc srv var
-boot2 home lib media root sys vmlinuz
-cdrom initrd lib32 mnt sbin tmp vmlinuz.old
-mark@mark-desktop:~/vt100-to-html/scripts$ exit
-
-Script done on Sun 17 May 2009 06:21:11 PM EDT
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-Script started on Sun 17 May 2009 06:21:21 PM EDT
-\e]2;mark-desktop - ~/vt100-to-html/scripts\a\e[1m\e[7m%\e[27m\e[1m\e[0m \r\r\e[0m\e[27m\e[24m\e[J\e[1;32m$\e[0m \e[K\e[54C\e[1;34m~/vt100-to-html/scripts\e[0m\e[77Dl\bls /\r\r
-\e]2;mark-desktop - ls /\a\e[00m\e[01;34mbin\e[00m \e[01;34mdev\e[00m \e[01;36minitrd.img\e[00m \e[01;36mlib64\e[00m \e[01;34mopt\e[00m \e[01;34mselinux\e[00m \e[01;34musr\e[00m\r
-\e[01;34mboot\e[00m \e[01;34metc\e[00m \e[01;36minitrd.img.old\e[00m \e[01;34mlost+found\e[00m \e[01;34mproc\e[00m \e[01;34msrv\e[00m \e[01;34mvar\e[00m\r
-\e[01;34mboot2\e[00m \e[01;34mhome\e[00m \e[01;34mlib\e[00m \e[01;34mmedia\e[00m \e[01;34mroot\e[00m \e[01;34msys\e[00m \e[01;36mvmlinuz\e[00m\r
-\e[01;36mcdrom\e[00m \e[01;34minitrd\e[00m \e[01;34mlib32\e[00m \e[01;34mmnt\e[00m \e[01;34msbin\e[00m \e[30;42mtmp\e[00m \e[01;36mvmlinuz.old\e[00m\r
-\e[m\e]2;mark-desktop - ~/vt100-to-html/scripts\a\e[1m\e[7m%\e[27m\e[1m\e[0m \r\r\e[0m\e[27m\e[24m\e[J\e[1;32m$\e[0m \e[K\e[54C\e[1;34m~/vt100-to-html/scripts\e[0m\e[77D\r\r
-
-Script done on Sun 17 May 2009 06:21:27 PM EDT
+++ /dev/null
-Script started on Sun 17 May 2009 06:21:21 PM EDT
-$ ls / ~/vt100-to-html/scripts
-bin dev initrd.img lib64 opt selinux usr
-boot etc initrd.img.old lost+found proc srv var
-boot2 home lib media root sys vmlinuz
-cdrom initrd lib32 mnt sbin tmp vmlinuz.old
-$ ~/vt100-to-html/scripts
-
-Script done on Sun 17 May 2009 06:21:27 PM EDT
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-Script started on Sun 15 Aug 2010 11:53:27 PM EDT
-\e]0;mark-desktop - ~/vt100-to-html/test\a\e[1m\e[7m%\e[27m\e[1m\e[0m \r\r\e[0m\e[27m\e[24m\e[J\e[1;32m$\e[0m \e[K\e[57C\e[1;34m~/vt100-to-html/test\e[0m\e[77Dl\bls\r\r
-\e]0;mark-desktop - ls\a\e[0m\e[01;34mexpected_text\e[0m t0016-SU.text t0050-ICH.text\r
-\e[01;34minput\e[0m t0017-SD.in t0051-IL.in\r
-\e[01;32mrun_all.py\e[0m t0017-SD.text t0051-IL.text\r
-t0001-all_printable.in t0020-CUF.in t0052-DL.in\r
-t0001-all_printable.text t0020-CUF.text t0052-DL.text\r
-t0002-history.in t0021-CUB.in t0053-DCH.in\r
-t0002-history.text t0021-CUB.text t0053-DCH.text\r
-t0003-line_wrap.in t0022-CUU.in t0054-ECH.in\r
-t0003-line_wrap.text t0022-CUU.text t0054-ECH.text\r
-t0004-LF.in t0023-CUU_scroll.in t0055-EL.in\r
-t0004-LF.text t0023-CUU_scroll.text t0055-EL.text\r
-t0005-CR.in t0024-CUD.in t0056-ED.in\r
-t0005-CR.text t0024-CUD.text t0056-ED.text\r
-t0006-IND.in t0025-CUP.in t0057-ED3.in\r
-t0006-IND.text t0025-CUP.text t0057-ED3.note\r
-t0007-space_at_end.in t0026-CNL.in t0057-ED3.text\r
-t0007-space_at_end.text t0026-CNL.text t0060-DECSC.in\r
-t0008-BS.in t0027-CPL.in t0060-DECSC.text\r
-t0008-BS.text t0027-CPL.text t0061-CSI_s.in\r
-t0009-NEL.in t0030-HPR.in t0061-CSI_s.text\r
-t0009-NEL.text t0030-HPR.text t008x-alt_screen_ED.in\r
-t0010-RI.in t0031-HPB.in t008x-IRM.in\r
-t0010-RI.text t0031-HPB.text t008x-NLM.in\r
-t0011-RI_scroll.in t0032-VPB.in t008x-save_cursor_mode.in\r
-t0011-RI_scroll.text t0032-VPB.text t0500-bash_long_line.in\r
-t0012-VT.in t0033-VPB_scroll.in t0500-bash_long_line.text\r
-t0012-VT.text t0033-VPB_scroll.text t0501-bash_ls.in\r
-t0013-FF.in t0034-VPR.in t0501-bash_ls.text\r
-t0013-FF.text t0034-VPR.text t0502-bash_ls_color.in\r
-t0014-CAN.in t0035-HVP.in t0502-bash_ls_color.text\r
-t0014-CAN.text t0035-HVP.text t0503-zsh_ls_color.in\r
-t0015-SUB.in t0040-REP.in t0503-zsh_ls_color.text\r
-t0015-SUB.text t0040-REP.text typescript\r
-t0016-SU.in t0050-ICH.in\r
-\e[m\e]0;mark-desktop - ~/vt100-to-html/test\a\e[1m\e[7m%\e[27m\e[1m\e[0m \r\r\e[0m\e[27m\e[24m\e[J\e[1;32m$\e[0m \e[K\e[57C\e[1;34m~/vt100-to-html/test\e[0m\e[77Dv\bvim\r\r
-\e]0;mark-desktop - vim\a\e[?1000h\e[?1049h\e[?1h\e=\e[1;24r\e[?12;25h\e[?12l\e[?25h\e[27m\e[m\e[H\e[2J\e[>c\e[?25l\e[2;1H\e[38;5;12m~ \e[3;1H~ \e[4;1H~ \e[5;1H~ \e[6;1H~ \e[7;1H~ \e[8;1H~ \e[9;1H~ \e[10;1H~ \e[11;1H~ \e[12;1H~ \e[13;1H~ \e[14;1H~ \e[15;1H~ \e[16;1H~ \e[17;1H~ \e[18;1H~ \e[19;1H~ \e[20;1H~ \e[21;1H~ \e[22;1H~ \e[m\e[23;1H\e[1m\e[7m\e[38;5;68m[No Name] 0,0-1 All\e[m\e[6;32HVIM - Vi IMproved\e[8;33Hversion 7.2.267\e[9;29Hby Bram Moolenaar et al.\e[10;19HVim is open source and freely distributable\e[12;26HBecome a registered Vim user!\e[13;18Htype :help register\e[38;5;81m<Enter>\e[m for information \e[15;18Htype :q\e[38;5;81m<Enter>\e[m to exit \e[16;18Htype :help\e[38;5;81m<Enter>\e[m or \e[38;5;81m<F1>\e[m for on-line help\e[17;18Htype :help version7\e[38;5;81m<Enter>\e[m for version info\e]2;[No Name] - VIM\a\e]1;[No Name]\a\e[1;1H\e[?12l\e[?25h\e[?1000l\e[?1002h\eP+q436f\e\\eP+q6b75\e\\eP+q6b64\e\\eP+q6b72\e\\eP+q6b6c\e\\eP+q2332\e\\eP+q2334\e\\eP+q2569\e\\eP+q2a37\e\\eP+q6b31\e\\e[?25l\e[24;1H\e[1m\e[38;5;3m-- INSERT --\e[m\e[23;65H\e[1m\e[7m\e[38;5;68m1 \e[1;1H\e[?12l\e[?25h\e[?25l\e[mT\e[6;32H\e[38;5;12m \e[8;33H \e[9;29H \e[10;19H \e[12;26H \e[13;18H \e[15;18H \e[16;18H \e[17;18H \e[m\e[23;11H\e[1m\e[7m\e[38;5;68m[+]\e[49C1,2 \e]2;[No Name] + - VIM\a\e]1;[No Name]\a\e[1;2H\e[?12l\e[?25h\e[?25l\e[m\bTh\e[23;65H\e[1m\e[7m\e[38;5;68m3 \e[1;3H\e[?12l\e[?25h\e[?25l\e[m\bhi\e[23;65H\e[1m\e[7m\e[38;5;68m4 \e[1;4H\e[?12l\e[?25h\e[?25l\e[m\bis\e[23;65H\e[1m\e[7m\e[38;5;68m5 \e[1;5H\e[?12l\e[?25h\e[?25l\e[23;65H6 \e[1;6H\e[?12l\e[?25h\e[?25l\e[m\b i\e[23;65H\e[1m\e[7m\e[38;5;68m7 \e[1;7H\e[?12l\e[?25h\e[?25l\e[m\bis\e[23;65H\e[1m\e[7m\e[38;5;68m8 \e[1;8H\e[?12l\e[?25h\e[?25l\e[23;65H9 \e[1;9H\e[?12l\e[?25h\e[?25l\e[m\b a\e[23;65H\e[1m\e[7m\e[38;5;68m10\e[1;10H\e[?12l\e[?25h\e[?25l\e[23;66H1 \e[1;11H\e[?12l\e[?25h\e[?25l\e[m\b t\e[23;66H\e[1m\e[7m\e[38;5;68m2 \e[1;12H\e[?12l\e[?25h\e[?25l\e[m\bte\e[23;66H\e[1m\e[7m\e[38;5;68m3 \e[1;13H\e[?12l\e[?25h\e[?25l\e[m\bes\e[23;66H\e[1m\e[7m\e[38;5;68m4 \e[1;14H\e[?12l\e[?25h\e[?25l\e[m\bst\e[23;66H\e[1m\e[7m\e[38;5;68m5 \e[1;15H\e[?12l\e[?25h\e[?25l\e[m\bt.\e[23;66H\e[1m\e[7m\e[38;5;68m6 \e[1;16H\e[?12l\e[?25h\e[?25l\e[m\e[2;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m2,1 \e[2;1H\e[?12l\e[?25h\e[?25l\e[m\e[3;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m3,\e[3;1H\e[?12l\e[?25h\e[?25l\e[mH\e[23;65H\e[1m\e[7m\e[38;5;68m2 \e[3;2H\e[?12l\e[?25h\e[?25l\e[m\bHo\e[23;65H\e[1m\e[7m\e[38;5;68m3 \e[3;3H\e[?12l\e[?25h\e[?25l\e[m\boe\e[23;65H\e[1m\e[7m\e[38;5;68m4 \e[3;4H\e[?12l\e[?25h\e[?25l\e[23;65H5 \e[3;5H\e[?12l\e[?25h\e[?25l\e[m\b f\e[23;65H\e[1m\e[7m\e[38;5;68m6 \e[3;6H\e[?12l\e[?25h\e[?25l\e[m\bfu\e[23;65H\e[1m\e[7m\e[38;5;68m7 \e[3;7H\e[?12l\e[?25h\e[?25l\e[m\e[3;6H\e[K\e[23;65H\e[1m\e[7m\e[38;5;68m6 \e[3;6H\e[?12l\e[?25h\e[?25l\e[m\e[3;5H\e[K\e[23;65H\e[1m\e[7m\e[38;5;68m5 \e[3;5H\e[?12l\e[?25h\e[?25l\e[23;65H4 \e[3;4H\e[?12l\e[?25h\e[?25l\e[m\e[3;3H\e[K\e[23;65H\e[1m\e[7m\e[38;5;68m3 \e[3;3H\e[?12l\e[?25h\e[?25l\e[m\bop\e[23;65H\e[1m\e[7m\e[38;5;68m4 \e[3;4H\e[?12l\e[?25h\e[?25l\e[m\bpe\e[23;65H\e[1m\e[7m\e[38;5;68m5 \e[3;5H\e[?12l\e[?25h\e[?25l\e[m\bef\e[23;65H\e[1m\e[7m\e[38;5;68m6 \e[3;6H\e[?12l\e[?25h\e[?25l\e[m\bfu\e[23;65H\e[1m\e[7m\e[38;5;68m7 \e[3;7H\e[?12l\e[?25h\e[?25l\e[m\bul\e[23;65H\e[1m\e[7m\e[38;5;68m8 \e[3;8H\e[?12l\e[?25h\e[?25l\e[m\bll\e[23;65H\e[1m\e[7m\e[38;5;68m9 \e[3;9H\e[?12l\e[?25h\e[?25l\e[m\bly\e[23;65H\e[1m\e[7m\e[38;5;68m10\e[3;10H\e[?12l\e[?25h\e[?25l\e[23;66H1 \e[3;11H\e[?12l\e[?25h\e[?25l\e[m\b i\e[23;66H\e[1m\e[7m\e[38;5;68m2 \e[3;12H\e[?12l\e[?25h\e[?25l\e[m\bit\e[23;66H\e[1m\e[7m\e[38;5;68m3 \e[3;13H\e[?12l\e[?25h\e[?25l\e[23;66H4 \e[3;14H\e[?12l\e[?25h\e[?25l\e[m\b w\e[23;66H\e[1m\e[7m\e[38;5;68m5 \e[3;15H\e[?12l\e[?25h\e[?25l\e[m\bwi\e[23;66H\e[1m\e[7m\e[38;5;68m6 \e[3;16H\e[?12l\e[?25h\e[?25l\e[m\bil\e[23;66H\e[1m\e[7m\e[38;5;68m7 \e[3;17H\e[?12l\e[?25h\e[?25l\e[m\bll\e[23;66H\e[1m\e[7m\e[38;5;68m8 \e[3;18H\e[?12l\e[?25h\e[?25l\e[23;66H9 \e[3;19H\e[?12l\e[?25h\e[?25l\e[m\b w\e[23;65H\e[1m\e[7m\e[38;5;68m20 \e[3;20H\e[?12l\e[?25h\e[?25l\e[m\bwo\e[23;66H\e[1m\e[7m\e[38;5;68m1 \e[3;21H\e[?12l\e[?25h\e[?25l\e[m\bor\e[23;66H\e[1m\e[7m\e[38;5;68m2 \e[3;22H\e[?12l\e[?25h\e[?25l\e[m\brk\e[23;66H\e[1m\e[7m\e[38;5;68m3 \e[3;23H\e[?12l\e[?25h\e[?25l\e[m\bk.\e[23;66H\e[1m\e[7m\e[38;5;68m4 \e[3;24H\e[?12l\e[?25h\e[?25l\e[m\e[4;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m4,1 \e[4;1H\e[?12l\e[?25h\e[?25l\e[m\e[5;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m5,\e[5;1H\e[?12l\e[?25h\e[?25l\e[m\e[6;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m6,\e[6;1H\e[?12l\e[?25h\e[?25l\e[m\e[7;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m7,\e[7;1H\e[?12l\e[?25h\e[?25l\e[m\e[8;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m8,\e[8;1H\e[?12l\e[?25h\e[?25l\e[m\e[9;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m9,\e[9;1H\e[?12l\e[?25h\e[?25l\e[m\e[10;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m10,1\e[10;1H\e[?12l\e[?25h\e[?25l\e[m\e[11;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m1,\e[11;1H\e[?12l\e[?25h\e[?25l\e[m\e[12;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m2,\e[12;1H\e[?12l\e[?25h\e[?25l\e[m\e[13;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m3,\e[13;1H\e[?12l\e[?25h\e[?25l\e[m\e[14;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m4,\e[14;1H\e[?12l\e[?25h\e[?25l\e[m\e[15;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m5,\e[15;1H\e[?12l\e[?25h\e[?25l\e[m\e[16;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m6,\e[16;1H\e[?12l\e[?25h\e[?25l\e[m\e[17;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m7,\e[17;1H\e[?12l\e[?25h\e[?25l\e[m\e[18;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m8,\e[18;1H\e[?12l\e[?25h\e[?25l\e[m\e[19;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m9,\e[19;1H\e[?12l\e[?25h\e[?25l\e[m\e[20;1H\e[K\e[23;63H\e[1m\e[7m\e[38;5;68m20,\e[20;1H\e[?12l\e[?25h\e[?25l\e[m\e[21;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m1,\e[21;1H\e[?12l\e[?25h\e[?25l\e[m\e[22;1H\e[K\e[23;64H\e[1m\e[7m\e[38;5;68m2,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
-\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m3,\e[12CBot\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
-\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m4,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
-\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m5,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
-\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m6,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
-\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m7,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
-\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m8,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
-\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m9,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
-\e[1;24r\e[23;63H\e[1m\e[7m\e[38;5;68m30,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
-\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m1,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
-\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m2,\e[22;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[22;1H\r
-\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m3,\e[22;1H\e[?12l\e[?25h\e[?25l\e[mI\e[23;66H\e[1m\e[7m\e[38;5;68m2 \e[22;2H\e[?12l\e[?25h\e[?25l\e[23;66H3 \e[22;3H\e[?12l\e[?25h\e[?25l\e[m\b b\e[23;66H\e[1m\e[7m\e[38;5;68m4 \e[22;4H\e[?12l\e[?25h\e[?25l\e[m\bbe\e[23;66H\e[1m\e[7m\e[38;5;68m5 \e[22;5H\e[?12l\e[?25h\e[?25l\e[m\bet\e[23;66H\e[1m\e[7m\e[38;5;68m6 \e[22;6H\e[?12l\e[?25h\e[?25l\e[23;66H7 \e[22;7H\e[?12l\e[?25h\e[?25l\e[m\b i\e[23;66H\e[1m\e[7m\e[38;5;68m8 \e[22;8H\e[?12l\e[?25h\e[?25l\e[m\bit\e[23;66H\e[1m\e[7m\e[38;5;68m9 \e[22;9H\e[?12l\e[?25h\e[?25l\e[23;66H10\e[22;10H\e[?12l\e[?25h\e[?25l\e[m\b w\e[23;67H\e[1m\e[7m\e[38;5;68m1 \e[22;11H\e[?12l\e[?25h\e[?25l\e[m\bwi\e[23;67H\e[1m\e[7m\e[38;5;68m2 \e[22;12H\e[?12l\e[?25h\e[?25l\e[m\bil\e[23;67H\e[1m\e[7m\e[38;5;68m3 \e[22;13H\e[?12l\e[?25h\e[?25l\e[m\bll\e[23;67H\e[1m\e[7m\e[38;5;68m4 \e[22;14H\e[?12l\e[?25h\e[?25l\e[m\bl.\e[23;67H\e[1m\e[7m\e[38;5;68m5 \e[22;15H\e[?12l\e[?25h\e[m\e[24;1H\e[K\e[22;14H\e[?25l\e[23;67H\e[1m\e[7m\e[38;5;68m4 \e[22;14H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[1;1H\e[11L\e[1;24r\e[1;1HThis is a test.\r
-\r
-Hopefully it will work.\e[23;63H\e[1m\e[7m\e[38;5;68m1,1 \e[9CTop\e[1;1H\e[?12l\e[?25h\e[?25l\e[27m\e[m\e[H\e[2J\e[13;1HI bet it will.\r
-\e[38;5;12m~ \e[15;1H~ \e[16;1H~ \e[17;1H~ \e[18;1H~ \e[19;1H~ \e[20;1H~ \e[21;1H~ \e[22;1H~ \e[m\e[23;1H\e[1m\e[7m\e[38;5;68m[No Name] [+] 21,0-1 Bot\e[1;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[1;1H\e[L\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m0,\e[1;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[1;1H\e[L\e[1;24r\e[23;63H\e[1m\e[7m\e[38;5;68m19,\e[1;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[1;1H\e[L\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m8,\e[1;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[1;1H\e[L\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m7,\e[1;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[1;1H\e[L\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m6,\e[1;1H\e[?12l\e[?25h\e[?25l\e[1;22r\e[m\e[1;1H\e[L\e[1;24r\e[23;64H\e[1m\e[7m\e[38;5;68m5,\e[1;1H\e[?12l\e[?25h\e[?25l\e[24;1H\e[m:\e[?12l\e[?25hw\e[?25l\e[?12l\e[?25hq\e[?25l\e[?12l\e[?25h\r\e[?25l\e[38;5;15m\e[48;5;1mE32: No file name\e[1;1H\e[?12l\e[?25h\e[?25l\e[m\e[24;1H\e[K\e[24;1H:\e[?12l\e[?25hw\e[?25l\e[?12l\e[?25h\e[?25l \e[?12l\e[?25hf\e[?25l\e[?12l\e[?25ho\e[?25l\e[?12l\e[?25ho\e[?25l\e[?12l\e[?25h\r\e[?25l"foo" [New] 33L, 85C written\e[23;1H\e[1m\e[7m\e[38;5;68mfoo \e]2;foo (~/vt100-to-html/test) - VIM\a\e]1;foo\a\e[1;1H\e[?12l\e[?25h\e[?25l\e[m\e[24;1H\e[K\e[24;1H:\e[?12l\e[?25hq\e[?25l\e[?12l\e[?25h\r\e[?25l\e[?1002l\e]2;mark-desktop - vim\a\e]1;mark-desktop - vim\a\e[24;1H\e[K\e[24;1H\e[?1l\e>\e[?12l\e[?25h\e[?1049l\e]0;mark-desktop - ~/vt100-to-html/test\a\e[1m\e[7m%\e[27m\e[1m\e[0m \r\r\e[0m\e[27m\e[24m\e[J\e[1;32m$\e[0m \e[K\e[57C\e[1;34m~/vt100-to-html/test\e[0m\e[77De\becho Yes!\r\r
-\e]0;mark-desktop - echo Yes!\aYes!\r
-\e]0;mark-desktop - ~/vt100-to-html/test\a\e[1m\e[7m%\e[27m\e[1m\e[0m \r\r\e[0m\e[27m\e[24m\e[J\e[1;32m$\e[0m \e[K\e[57C\e[1;34m~/vt100-to-html/test\e[0m\e[77D\r\r
-
-Script done on Sun 15 Aug 2010 11:54:14 PM EDT
+++ /dev/null
-t0005-CR.in t0024-CUD.in t0056-ED.in
-t0005-CR.text t0024-CUD.text t0056-ED.text
-t0006-IND.in t0025-CUP.in t0057-ED3.in
-t0006-IND.text t0025-CUP.text t0057-ED3.note
-t0007-space_at_end.in t0026-CNL.in t0057-ED3.text
-t0007-space_at_end.text t0026-CNL.text t0060-DECSC.in
-t0008-BS.in t0027-CPL.in t0060-DECSC.text
-t0008-BS.text t0027-CPL.text t0061-CSI_s.in
-t0009-NEL.in t0030-HPR.in t0061-CSI_s.text
-t0009-NEL.text t0030-HPR.text t008x-alt_screen_ED.in
-t0010-RI.in t0031-HPB.in t008x-IRM.in
-t0010-RI.text t0031-HPB.text t008x-NLM.in
-t0011-RI_scroll.in t0032-VPB.in t008x-save_cursor_mode.in
-t0011-RI_scroll.text t0032-VPB.text t0500-bash_long_line.in
-t0012-VT.in t0033-VPB_scroll.in t0500-bash_long_line.text
-t0012-VT.text t0033-VPB_scroll.text t0501-bash_ls.in
-t0013-FF.in t0034-VPR.in t0501-bash_ls.text
-t0013-FF.text t0034-VPR.text t0502-bash_ls_color.in
-t0014-CAN.in t0035-HVP.in t0502-bash_ls_color.text
-t0014-CAN.text t0035-HVP.text t0503-zsh_ls_color.in
-t0015-SUB.in t0040-REP.in t0503-zsh_ls_color.text
-t0015-SUB.text t0040-REP.text typescript
-t0016-SU.in t0050-ICH.in
-$ vim ~/vt100-to-html/test
-Script done on Sun 15 Aug 2010 11:54:14 PM EDT ~/vt100-to-html/test
+++ /dev/null
-var assert = require('chai').assert;
-var expect = require('chai').expect;
-var Terminal = require('../build/xterm');
-
-describe('xterm.js', function() {
- var xterm;
-
- beforeEach(function () {
- xterm = new Terminal();
- xterm.refresh = function(){};
- xterm.viewport = {
- syncScrollArea: function(){}
- };
- });
-
- describe('getOption', function() {
- it('should retrieve the option correctly', function() {
- // In the `options` namespace.
- xterm.options.cursorBlink = true;
- assert.equal(xterm.getOption('cursorBlink'), true);
-
- // On the Terminal instance
- delete xterm.options.cursorBlink;
- xterm.cursorBlink = false;
- assert.equal(xterm.getOption('cursorBlink'), false);
- });
- it('should throw when retrieving a non-existant option', function() {
- assert.throws(xterm.getOption.bind(xterm, 'fake', true));
- });
- });
-
- describe('setOption', function() {
- it('should set the option correctly', function() {
- xterm.setOption('cursorBlink', true);
- assert.equal(xterm.cursorBlink, true);
- assert.equal(xterm.options.cursorBlink, true);
- xterm.setOption('cursorBlink', false);
- assert.equal(xterm.cursorBlink, false);
- assert.equal(xterm.options.cursorBlink, false);
- });
- it('should throw when setting a non-existant option', function() {
- assert.throws(xterm.setOption.bind(xterm, 'fake', true));
- });
- });
-
- describe('clear', function() {
- it('should clear a buffer equal to rows', function() {
- var promptLine = xterm.lines[xterm.ybase + xterm.y];
- xterm.clear();
- assert.equal(xterm.y, 0);
- assert.equal(xterm.ybase, 0);
- assert.equal(xterm.ydisp, 0);
- assert.equal(xterm.lines.length, xterm.rows);
- assert.deepEqual(xterm.lines[0], promptLine);
- for (var i = 1; i < xterm.rows; i++) {
- assert.deepEqual(xterm.lines[0], xterm.blankLine());
- }
- });
- it('should clear a buffer larger than rows', function() {
- // Fill the buffer with dummy rows
- for (var i = 0; i < xterm.rows * 2; i++) {
- xterm.write('test\n');
- }
-
- var promptLine = xterm.lines[xterm.ybase + xterm.y];
- xterm.clear();
- assert.equal(xterm.y, 0);
- assert.equal(xterm.ybase, 0);
- assert.equal(xterm.ydisp, 0);
- assert.equal(xterm.lines.length, xterm.rows);
- assert.deepEqual(xterm.lines[0], promptLine);
- for (var i = 1; i < xterm.rows; i++) {
- assert.deepEqual(xterm.lines[i], xterm.blankLine());
- }
- });
- it('should not break the prompt when cleared twice', function() {
- var promptLine = xterm.lines[xterm.ybase + xterm.y];
- xterm.clear();
- xterm.clear();
- assert.equal(xterm.y, 0);
- assert.equal(xterm.ybase, 0);
- assert.equal(xterm.ydisp, 0);
- assert.equal(xterm.lines.length, xterm.rows);
- assert.deepEqual(xterm.lines[0], promptLine);
- for (var i = 1; i < xterm.rows; i++) {
- assert.deepEqual(xterm.lines[i], xterm.blankLine());
- }
- });
- });
-
- describe('scroll', function() {
- describe('scrollDisp', function() {
- var startYDisp;
- beforeEach(function() {
- for (var i = 0; i < xterm.rows * 2; i++) {
- xterm.writeln('test');
- }
- startYDisp = xterm.rows + 1;
- });
- it('should scroll a single line', function() {
- assert.equal(xterm.ydisp, startYDisp);
- xterm.scrollDisp(-1);
- assert.equal(xterm.ydisp, startYDisp - 1);
- xterm.scrollDisp(1);
- assert.equal(xterm.ydisp, startYDisp);
- });
- it('should scroll multiple lines', function() {
- assert.equal(xterm.ydisp, startYDisp);
- xterm.scrollDisp(-5);
- assert.equal(xterm.ydisp, startYDisp - 5);
- xterm.scrollDisp(5);
- assert.equal(xterm.ydisp, startYDisp);
- });
- it('should not scroll beyond the bounds of the buffer', function() {
- assert.equal(xterm.ydisp, startYDisp);
- xterm.scrollDisp(1);
- assert.equal(xterm.ydisp, startYDisp);
- for (var i = 0; i < startYDisp; i++) {
- xterm.scrollDisp(-1);
- }
- assert.equal(xterm.ydisp, 0);
- xterm.scrollDisp(-1);
- assert.equal(xterm.ydisp, 0);
- });
- });
-
- describe('scrollPages', function() {
- var startYDisp;
- beforeEach(function() {
- for (var i = 0; i < xterm.rows * 3; i++) {
- xterm.writeln('test');
- }
- startYDisp = (xterm.rows * 2) + 1;
- });
- it('should scroll a single page', function() {
- assert.equal(xterm.ydisp, startYDisp);
- xterm.scrollPages(-1);
- assert.equal(xterm.ydisp, startYDisp - (xterm.rows - 1));
- xterm.scrollPages(1);
- assert.equal(xterm.ydisp, startYDisp);
- });
- it('should scroll a multiple pages', function() {
- assert.equal(xterm.ydisp, startYDisp);
- xterm.scrollPages(-2);
- assert.equal(xterm.ydisp, startYDisp - (xterm.rows - 1) * 2);
- xterm.scrollPages(2);
- assert.equal(xterm.ydisp, startYDisp);
- });
- });
-
- describe('scrollToTop', function() {
- beforeEach(function() {
- for (var i = 0; i < xterm.rows * 3; i++) {
- xterm.writeln('test');
- }
- });
- it('should scroll to the top', function() {
- assert.notEqual(xterm.ydisp, 0);
- xterm.scrollToTop();
- assert.equal(xterm.ydisp, 0);
- });
- });
-
- describe('scrollToBottom', function() {
- var startYDisp;
- beforeEach(function() {
- for (var i = 0; i < xterm.rows * 3; i++) {
- xterm.writeln('test');
- }
- startYDisp = (xterm.rows * 2) + 1;
- });
- it('should scroll to the bottom', function() {
- xterm.scrollDisp(-1);
- xterm.scrollToBottom();
- assert.equal(xterm.ydisp, startYDisp);
- xterm.scrollPages(-1);
- xterm.scrollToBottom();
- assert.equal(xterm.ydisp, startYDisp);
- xterm.scrollToTop();
- xterm.scrollToBottom();
- assert.equal(xterm.ydisp, startYDisp);
- });
- });
- });
-
- describe('evaluateKeyEscapeSequence', function() {
- it('should return the correct escape sequence for unmodified keys', function() {
- // Backspace
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 8 }).key, '\x7f'); // ^?
- // Tab
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 9 }).key, '\t');
- // Return/enter
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 13 }).key, '\r'); // CR
- // Escape
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 27 }).key, '\x1b');
- // Page up, page down
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 33 }).key, '\x1b[5~'); // CSI 5 ~
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 34 }).key, '\x1b[6~'); // CSI 6 ~
- // End, Home
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 35 }).key, '\x1b[F'); // SS3 F
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 36 }).key, '\x1b[H'); // SS3 H
- // Left, up, right, down arrows
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 37 }).key, '\x1b[D'); // CSI D
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 38 }).key, '\x1b[A'); // CSI A
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 39 }).key, '\x1b[C'); // CSI C
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 40 }).key, '\x1b[B'); // CSI B
- // Insert
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 45 }).key, '\x1b[2~'); // CSI 2 ~
- // Delete
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 46 }).key, '\x1b[3~'); // CSI 3 ~
- // F1-F12
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 112 }).key, '\x1bOP'); // SS3 P
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 113 }).key, '\x1bOQ'); // SS3 Q
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 114 }).key, '\x1bOR'); // SS3 R
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 115 }).key, '\x1bOS'); // SS3 S
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 116 }).key, '\x1b[15~'); // CSI 1 5 ~
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 117 }).key, '\x1b[17~'); // CSI 1 7 ~
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 118 }).key, '\x1b[18~'); // CSI 1 8 ~
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 119 }).key, '\x1b[19~'); // CSI 1 9 ~
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 120 }).key, '\x1b[20~'); // CSI 2 0 ~
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 121 }).key, '\x1b[21~'); // CSI 2 1 ~
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 122 }).key, '\x1b[23~'); // CSI 2 3 ~
- assert.equal(xterm.evaluateKeyEscapeSequence({ keyCode: 123 }).key, '\x1b[24~'); // CSI 2 4 ~
- });
- it('should return \\x1b[3;5~ for ctrl+delete', function() {
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 46 }).key, '\x1b[3;5~');
- });
- it('should return \\x1b[3;2~ for shift+delete', function() {
- assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 46 }).key, '\x1b[3;2~');
- });
- it('should return \\x1b[3;3~ for alt+delete', function() {
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 46 }).key, '\x1b[3;3~');
- });
- it('should return \\x1b[5D for ctrl+left', function() {
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 37 }).key, '\x1b[1;5D'); // CSI 5 D
- });
- it('should return \\x1b[5C for ctrl+right', function() {
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 39 }).key, '\x1b[1;5C'); // CSI 5 C
- });
- it('should return \\x1b[5A for ctrl+up', function() {
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 38 }).key, '\x1b[1;5A'); // CSI 5 A
- });
- it('should return \\x1b[5B for ctrl+down', function() {
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 40 }).key, '\x1b[1;5B'); // CSI 5 B
- });
- // Evalueate alt + arrow key movement, which is a feature of terminal emulators but not VT100
- // http://unix.stackexchange.com/a/108106
- it('should return \\x1b[5D for alt+left', function() {
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 37 }).key, '\x1b[1;5D'); // CSI 5 D
- });
- it('should return \\x1b[5C for alt+right', function() {
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 39 }).key, '\x1b[1;5C'); // CSI 5 C
- });
- it('should return \\x1b[5A for alt+up', function() {
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 38 }).key, '\x1b[1;5A'); // CSI 5 A
- });
- it('should return \\x1b[5B for alt+down', function() {
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 40 }).key, '\x1b[1;5B'); // CSI 5 B
- });
- it('should return the correct escape sequence for modified F1-F12 keys', function() {
- assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 112 }).key, '\x1b[1;2P');
- assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 113 }).key, '\x1b[1;2Q');
- assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 114 }).key, '\x1b[1;2R');
- assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 115 }).key, '\x1b[1;2S');
- assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 116 }).key, '\x1b[15;2~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 117 }).key, '\x1b[17;2~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 118 }).key, '\x1b[18;2~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 119 }).key, '\x1b[19;2~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 120 }).key, '\x1b[20;2~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 121 }).key, '\x1b[21;2~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 122 }).key, '\x1b[23;2~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ shiftKey: true, keyCode: 123 }).key, '\x1b[24;2~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 112 }).key, '\x1b[1;3P');
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 113 }).key, '\x1b[1;3Q');
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 114 }).key, '\x1b[1;3R');
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 115 }).key, '\x1b[1;3S');
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 116 }).key, '\x1b[15;3~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 117 }).key, '\x1b[17;3~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 118 }).key, '\x1b[18;3~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 119 }).key, '\x1b[19;3~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 120 }).key, '\x1b[20;3~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 121 }).key, '\x1b[21;3~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 122 }).key, '\x1b[23;3~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ altKey: true, keyCode: 123 }).key, '\x1b[24;3~');
-
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 112 }).key, '\x1b[1;5P');
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 113 }).key, '\x1b[1;5Q');
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 114 }).key, '\x1b[1;5R');
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 115 }).key, '\x1b[1;5S');
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 116 }).key, '\x1b[15;5~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 117 }).key, '\x1b[17;5~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 118 }).key, '\x1b[18;5~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 119 }).key, '\x1b[19;5~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 120 }).key, '\x1b[20;5~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 121 }).key, '\x1b[21;5~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 122 }).key, '\x1b[23;5~');
- assert.equal(xterm.evaluateKeyEscapeSequence({ ctrlKey: true, keyCode: 123 }).key, '\x1b[24;5~');
- });
- });
-
- describe('attachCustomEventHandler', function () {
- var evKeyDown = {
- preventDefault: function() {},
- stopPropagation: function() {},
- type: 'keydown'
- }
-
- beforeEach(function() {
- xterm.handler = function() {};
- xterm.showCursor = function() {};
- xterm.clearSelection = function() {};
- xterm.compositionHelper = {
- keydown: {
- bind: function() {
- return function () { return true; }
- }
- }
- }
- });
-
- it('should process the keydown event based on what the handler returns', function () {
- assert.equal(xterm.keyDown(Object.assign({}, evKeyDown, { keyCode: 77 })), true);
- xterm.attachCustomKeydownHandler(function (ev) {
- return ev.keyCode === 77;
- });
- assert.equal(xterm.keyDown(Object.assign({}, evKeyDown, { keyCode: 77 })), true);
- xterm.attachCustomKeydownHandler(function (ev) {
- return ev.keyCode !== 77;
- });
- assert.equal(xterm.keyDown(Object.assign({}, evKeyDown, { keyCode: 77 })), false);
- });
-
- it('should alive after reset(ESC c Full Reset (RIS))', function () {
- xterm.attachCustomKeydownHandler(function (ev) {
- return ev.keyCode !== 77;
- });
- assert.equal(xterm.keyDown(Object.assign({}, evKeyDown, { keyCode: 77 })), false);
- xterm.reset();
- assert.equal(xterm.keyDown(Object.assign({}, evKeyDown, { keyCode: 77 })), false);
- });
- });
-
- describe('Third level shift', function() {
- var evKeyDown = {
- preventDefault: function() {},
- stopPropagation: function() {},
- type: 'keydown'
- },
- evKeyPress = {
- preventDefault: function() {},
- stopPropagation: function() {},
- type: 'keypress'
- };
-
- beforeEach(function() {
- xterm.handler = function() {};
- xterm.showCursor = function() {};
- xterm.clearSelection = function() {};
- xterm.compositionHelper = {
- isComposing: false,
- keydown: {
- bind: function() {
- return function() { return true; };
- }
- }
- };
- });
-
- describe('On Mac OS', function() {
- beforeEach(function() {
- xterm.isMac = true;
- });
-
- it('should not interfere with the alt key on keyDown', function() {
- assert.equal(
- xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, keyCode: 81 })),
- true
- );
- assert.equal(
- xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, keyCode: 192 })),
- true
- );
- });
-
- it('should interefere with the alt + arrow keys', function() {
- assert.equal(
- xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, keyCode: 37 })),
- false
- );
- assert.equal(
- xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, keyCode: 39 })),
- false
- );
- });
-
- it('should emit key with alt + key on keyPress', function(done) {
- var keys = ['@', '@', '\\', '\\', '|', '|'];
-
- xterm.on('keypress', function(key) {
- if (key) {
- var index = keys.indexOf(key);
- assert(index !== -1, "Emitted wrong key: " + key);
- keys.splice(index, 1);
- }
- if (keys.length === 0) done();
- });
-
- xterm.keyPress(Object.assign({}, evKeyPress, { altKey: true, keyCode: 64 })); // @
- // Firefox
- xterm.keyPress(Object.assign({}, evKeyPress, { altKey: true, charCode: 64, keyCode: 0 }));
- xterm.keyPress(Object.assign({}, evKeyPress, { altKey: true, keyCode: 92 })); // \
- xterm.keyPress(Object.assign({}, evKeyPress, { altKey: true, charCode: 92, keyCode: 0 }));
- xterm.keyPress(Object.assign({}, evKeyPress, { altKey: true, keyCode: 124 })); // |
- xterm.keyPress(Object.assign({}, evKeyPress, { altKey: true, charCode: 124, keyCode: 0 }));
- });
- });
-
- describe('On MS Windows', function() {
- beforeEach(function() {
- xterm.isMSWindows = true;
- });
-
- it('should not interfere with the alt + ctrl key on keyDown', function() {
- assert.equal(
- xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, ctrlKey: true, keyCode: 81 })),
- true
- );
- assert.equal(
- xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, ctrlKey: true, keyCode: 192 })),
- true
- );
- });
-
- it('should interefere with the alt + ctrl + arrow keys', function() {
- assert.equal(
- xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, ctrlKey: true, keyCode: 37 })),
- false
- );
- assert.equal(
- xterm.keyDown(Object.assign({}, evKeyDown, { altKey: true, ctrlKey: true, keyCode: 39 })),
- false
- );
- });
-
- it('should emit key with alt + ctrl + key on keyPress', function(done) {
- var keys = ['@', '@', '\\', '\\', '|', '|'];
-
- xterm.on('keypress', function(key) {
- if (key) {
- var index = keys.indexOf(key);
- assert(index !== -1, "Emitted wrong key: " + key);
- keys.splice(index, 1);
- }
- if (keys.length === 0) done();
- });
-
- xterm.keyPress(
- Object.assign({}, evKeyPress, { altKey: true, ctrlKey: true, keyCode: 64 })
- ); // @
- xterm.keyPress(
- Object.assign({}, evKeyPress, { altKey: true, ctrlKey: true, charCode: 64, keyCode: 0 })
- );
- xterm.keyPress(
- Object.assign({}, evKeyPress, { altKey: true, ctrlKey: true, keyCode: 92 })
- ); // \
- xterm.keyPress(
- Object.assign({}, evKeyPress, { altKey: true, ctrlKey: true, charCode: 92, keyCode: 0 })
- );
- xterm.keyPress(
- Object.assign({}, evKeyPress, { altKey: true, ctrlKey: true, keyCode: 124 })
- ); // |
- xterm.keyPress(
- Object.assign({}, evKeyPress, { altKey: true, ctrlKey: true, charCode: 124, keyCode: 0 })
- );
- });
- });
- });
-
- describe('unicode - surrogates', function() {
- it('2 characters per cell', function () {
- var high = String.fromCharCode(0xD800);
- for (var i=0xDC00; i<=0xDCFF; ++i) {
- xterm.write(high + String.fromCharCode(i));
- var tchar = xterm.lines[0][0];
- expect(tchar[1]).eql(high + String.fromCharCode(i));
- expect(tchar[1].length).eql(2);
- expect(tchar[2]).eql(1);
- expect(xterm.lines[0][1][1]).eql(' ');
- xterm.reset();
- }
- });
- it('2 characters at last cell', function() {
- var high = String.fromCharCode(0xD800);
- for (var i=0xDC00; i<=0xDCFF; ++i) {
- xterm.x = xterm.cols - 1;
- xterm.write(high + String.fromCharCode(i));
- expect(xterm.lines[0][xterm.x-1][1]).eql(high + String.fromCharCode(i));
- expect(xterm.lines[0][xterm.x-1][1].length).eql(2);
- expect(xterm.lines[1][0][1]).eql(' ');
- xterm.reset();
- }
- });
- it('2 characters per cell over line end with autowrap', function() {
- var high = String.fromCharCode(0xD800);
- for (var i=0xDC00; i<=0xDCFF; ++i) {
- xterm.x = xterm.cols - 1;
- xterm.wraparoundMode = true;
- xterm.write('a' + high + String.fromCharCode(i));
- expect(xterm.lines[0][xterm.cols-1][1]).eql('a');
- expect(xterm.lines[1][0][1]).eql(high + String.fromCharCode(i));
- expect(xterm.lines[1][0][1].length).eql(2);
- expect(xterm.lines[1][1][1]).eql(' ');
- xterm.reset();
- }
- });
- it('2 characters per cell over line end without autowrap', function() {
- var high = String.fromCharCode(0xD800);
- for (var i=0xDC00; i<=0xDCFF; ++i) {
- xterm.x = xterm.cols - 1;
- xterm.wraparoundMode = false;
- xterm.write('a' + high + String.fromCharCode(i));
- expect(xterm.lines[0][xterm.cols-1][1]).eql(high + String.fromCharCode(i));
- expect(xterm.lines[0][xterm.cols-1][1].length).eql(2);
- expect(xterm.lines[1][1][1]).eql(' ');
- xterm.reset();
- }
- });
- it('splitted surrogates', function() {
- var high = String.fromCharCode(0xD800);
- for (var i=0xDC00; i<=0xDCFF; ++i) {
- xterm.write(high);
- xterm.write(String.fromCharCode(i));
- var tchar = xterm.lines[0][0];
- expect(tchar[1]).eql(high + String.fromCharCode(i));
- expect(tchar[1].length).eql(2);
- expect(tchar[2]).eql(1);
- expect(xterm.lines[0][1][1]).eql(' ');
- xterm.reset();
- }
- });
- });
-
- describe('unicode - combining characters', function() {
- it('café', function () {
- xterm.write('cafe\u0301');
- expect(xterm.lines[0][3][1]).eql('e\u0301');
- expect(xterm.lines[0][3][1].length).eql(2);
- expect(xterm.lines[0][3][2]).eql(1);
- });
- it('café - end of line', function() {
- xterm.x = xterm.cols - 1 - 3;
- xterm.write('cafe\u0301');
- expect(xterm.lines[0][xterm.cols-1][1]).eql('e\u0301');
- expect(xterm.lines[0][xterm.cols-1][1].length).eql(2);
- expect(xterm.lines[0][xterm.cols-1][2]).eql(1);
- expect(xterm.lines[0][1][1]).eql(' ');
- expect(xterm.lines[0][1][1].length).eql(1);
- expect(xterm.lines[0][1][2]).eql(1);
- });
- it('multiple combined é', function() {
- xterm.wraparoundMode = true;
- xterm.write(Array(100).join('e\u0301'));
- for (var i=0; i<xterm.cols; ++i) {
- var tchar = xterm.lines[0][i];
- expect(tchar[1]).eql('e\u0301');
- expect(tchar[1].length).eql(2);
- expect(tchar[2]).eql(1);
- }
- tchar = xterm.lines[1][0];
- expect(tchar[1]).eql('e\u0301');
- expect(tchar[1].length).eql(2);
- expect(tchar[2]).eql(1);
- });
- it('multiple surrogate with combined', function() {
- xterm.wraparoundMode = true;
- xterm.write(Array(100).join('\uD800\uDC00\u0301'));
- for (var i=0; i<xterm.cols; ++i) {
- var tchar = xterm.lines[0][i];
- expect(tchar[1]).eql('\uD800\uDC00\u0301');
- expect(tchar[1].length).eql(3);
- expect(tchar[2]).eql(1);
- }
- tchar = xterm.lines[1][0];
- expect(tchar[1]).eql('\uD800\uDC00\u0301');
- expect(tchar[1].length).eql(3);
- expect(tchar[2]).eql(1);
- });
- });
-
- describe('unicode - fullwidth characters', function() {
- it('cursor movement even', function() {
- expect(xterm.x).eql(0);
- xterm.write('¥');
- expect(xterm.x).eql(2);
- });
- it('cursor movement odd', function() {
- xterm.x = 1;
- expect(xterm.x).eql(1);
- xterm.write('¥');
- expect(xterm.x).eql(3);
- });
- it('line of ¥ even', function() {
- xterm.wraparoundMode = true;
- xterm.write(Array(50).join('¥'));
- for (var i=0; i<xterm.cols; ++i) {
- var tchar = xterm.lines[0][i];
- if (i % 2) {
- expect(tchar[1]).eql('');
- expect(tchar[1].length).eql(0);
- expect(tchar[2]).eql(0);
- } else {
- expect(tchar[1]).eql('¥');
- expect(tchar[1].length).eql(1);
- expect(tchar[2]).eql(2);
- }
- }
- tchar = xterm.lines[1][0];
- expect(tchar[1]).eql('¥');
- expect(tchar[1].length).eql(1);
- expect(tchar[2]).eql(2);
- });
- it('line of ¥ odd', function() {
- xterm.wraparoundMode = true;
- xterm.x = 1;
- xterm.write(Array(50).join('¥'));
- for (var i=1; i<xterm.cols-1; ++i) {
- var tchar = xterm.lines[0][i];
- if (!(i % 2)) {
- expect(tchar[1]).eql('');
- expect(tchar[1].length).eql(0);
- expect(tchar[2]).eql(0);
- } else {
- expect(tchar[1]).eql('¥');
- expect(tchar[1].length).eql(1);
- expect(tchar[2]).eql(2);
- }
- }
- tchar = xterm.lines[0][xterm.cols-1];
- expect(tchar[1]).eql(' ');
- expect(tchar[1].length).eql(1);
- expect(tchar[2]).eql(1);
- tchar = xterm.lines[1][0];
- expect(tchar[1]).eql('¥');
- expect(tchar[1].length).eql(1);
- expect(tchar[2]).eql(2);
- });
- it('line of ¥ with combining odd', function() {
- xterm.wraparoundMode = true;
- xterm.x = 1;
- xterm.write(Array(50).join('¥\u0301'));
- for (var i=1; i<xterm.cols-1; ++i) {
- var tchar = xterm.lines[0][i];
- if (!(i % 2)) {
- expect(tchar[1]).eql('');
- expect(tchar[1].length).eql(0);
- expect(tchar[2]).eql(0);
- } else {
- expect(tchar[1]).eql('¥\u0301');
- expect(tchar[1].length).eql(2);
- expect(tchar[2]).eql(2);
- }
- }
- tchar = xterm.lines[0][xterm.cols-1];
- expect(tchar[1]).eql(' ');
- expect(tchar[1].length).eql(1);
- expect(tchar[2]).eql(1);
- tchar = xterm.lines[1][0];
- expect(tchar[1]).eql('¥\u0301');
- expect(tchar[1].length).eql(2);
- expect(tchar[2]).eql(2);
- });
- it('line of ¥ with combining even', function() {
- xterm.wraparoundMode = true;
- xterm.write(Array(50).join('¥\u0301'));
- for (var i=0; i<xterm.cols; ++i) {
- var tchar = xterm.lines[0][i];
- if (i % 2) {
- expect(tchar[1]).eql('');
- expect(tchar[1].length).eql(0);
- expect(tchar[2]).eql(0);
- } else {
- expect(tchar[1]).eql('¥\u0301');
- expect(tchar[1].length).eql(2);
- expect(tchar[2]).eql(2);
- }
- }
- tchar = xterm.lines[1][0];
- expect(tchar[1]).eql('¥\u0301');
- expect(tchar[1].length).eql(2);
- expect(tchar[2]).eql(2);
- });
- it('line of surrogate fullwidth with combining odd', function() {
- xterm.wraparoundMode = true;
- xterm.x = 1;
- xterm.write(Array(50).join('\ud843\ude6d\u0301'));
- for (var i=1; i<xterm.cols-1; ++i) {
- var tchar = xterm.lines[0][i];
- if (!(i % 2)) {
- expect(tchar[1]).eql('');
- expect(tchar[1].length).eql(0);
- expect(tchar[2]).eql(0);
- } else {
- expect(tchar[1]).eql('\ud843\ude6d\u0301');
- expect(tchar[1].length).eql(3);
- expect(tchar[2]).eql(2);
- }
- }
- tchar = xterm.lines[0][xterm.cols-1];
- expect(tchar[1]).eql(' ');
- expect(tchar[1].length).eql(1);
- expect(tchar[2]).eql(1);
- tchar = xterm.lines[1][0];
- expect(tchar[1]).eql('\ud843\ude6d\u0301');
- expect(tchar[1].length).eql(3);
- expect(tchar[2]).eql(2);
- });
- it('line of surrogate fullwidth with combining even', function() {
- xterm.wraparoundMode = true;
- xterm.write(Array(50).join('\ud843\ude6d\u0301'));
- for (var i=0; i<xterm.cols; ++i) {
- var tchar = xterm.lines[0][i];
- if (i % 2) {
- expect(tchar[1]).eql('');
- expect(tchar[1].length).eql(0);
- expect(tchar[2]).eql(0);
- } else {
- expect(tchar[1]).eql('\ud843\ude6d\u0301');
- expect(tchar[1].length).eql(3);
- expect(tchar[2]).eql(2);
- }
- }
- tchar = xterm.lines[1][0];
- expect(tchar[1]).eql('\ud843\ude6d\u0301');
- expect(tchar[1].length).eql(3);
- expect(tchar[2]).eql(2);
- });
- });
-
- describe('insert mode', function() {
- it('halfwidth - all', function () {
- xterm.write(Array(9).join('0123456789').slice(-80));
- xterm.x = 10;
- xterm.y = 0;
- xterm.insertMode = true;
- xterm.write('abcde');
- expect(xterm.lines[0].length).eql(xterm.cols);
- expect(xterm.lines[0][10][1]).eql('a');
- expect(xterm.lines[0][14][1]).eql('e');
- expect(xterm.lines[0][15][1]).eql('0');
- expect(xterm.lines[0][79][1]).eql('4');
- });
- it('fullwidth - insert', function() {
- xterm.write(Array(9).join('0123456789').slice(-80));
- xterm.x = 10;
- xterm.y = 0;
- xterm.insertMode = true;
- xterm.write('¥¥¥');
- expect(xterm.lines[0].length).eql(xterm.cols);
- expect(xterm.lines[0][10][1]).eql('¥');
- expect(xterm.lines[0][11][1]).eql('');
- expect(xterm.lines[0][14][1]).eql('¥');
- expect(xterm.lines[0][15][1]).eql('');
- expect(xterm.lines[0][79][1]).eql('3');
- });
- it('fullwidth - right border', function() {
- xterm.write(Array(41).join('¥'));
- xterm.x = 10;
- xterm.y = 0;
- xterm.insertMode = true;
- xterm.write('a');
- expect(xterm.lines[0].length).eql(xterm.cols);
- expect(xterm.lines[0][10][1]).eql('a');
- expect(xterm.lines[0][11][1]).eql('¥');
- expect(xterm.lines[0][79][1]).eql(' '); // fullwidth char got replaced
- xterm.write('b');
- expect(xterm.lines[0].length).eql(xterm.cols);
- expect(xterm.lines[0][11][1]).eql('b');
- expect(xterm.lines[0][12][1]).eql('¥');
- expect(xterm.lines[0][79][1]).eql(''); // empty cell after fullwidth
- });
- });
-});
+++ /dev/null
-var assert = require('chai').assert;
-var Terminal = require('../build/xterm');
-
-describe('Viewport', function () {
- var terminal;
- var viewportElement;
- var charMeasureElement;
- var viewport;
- var scrollAreaElement;
-
- var CHARACTER_HEIGHT = 10;
-
- beforeEach(function () {
- terminal = {
- lines: [],
- rows: 0,
- ydisp: 0,
- on: function () {},
- rowContainer: {
- style: {
- lineHeight: 0
- }
- }
- };
- viewportElement = {
- addEventListener: function () {},
- style: {
- height: 0,
- lineHeight: 0
- }
- };
- scrollAreaElement = {
- style: {
- height: 0
- }
- };
- charMeasureElement = {
- getBoundingClientRect: function () {
- return { width: null, height: CHARACTER_HEIGHT };
- }
- };
- viewport = new Terminal.Viewport(terminal, viewportElement, scrollAreaElement, charMeasureElement);
- });
-
- describe('Public API', function () {
- it('should define Viewport.prototype.onWheel', function () {
- assert.isDefined(Terminal.Viewport.prototype.onWheel);
- });
- });
-
- describe('refresh', function () {
- it('should set the line-height of the terminal', function () {
- assert.equal(viewportElement.style.lineHeight, CHARACTER_HEIGHT + 'px');
- assert.equal(terminal.rowContainer.style.lineHeight, CHARACTER_HEIGHT + 'px');
- charMeasureElement.getBoundingClientRect = function () {
- return { width: null, height: 1 };
- };
- viewport.refresh();
- assert.equal(viewportElement.style.lineHeight, '1px');
- assert.equal(terminal.rowContainer.style.lineHeight, '1px');
- });
- it('should set the height of the viewport when the line-height changed', function () {
- terminal.lines.push('');
- terminal.lines.push('');
- terminal.rows = 1;
- viewport.refresh();
- assert.equal(viewportElement.style.height, 1 * CHARACTER_HEIGHT + 'px');
- charMeasureElement.getBoundingClientRect = function () {
- return { width: null, height: 20 };
- };
- viewport.refresh();
- assert.equal(viewportElement.style.height, 20 + 'px');
- });
- });
-
- describe('syncScrollArea', function () {
- it('should sync the scroll area', function () {
- terminal.lines.push('');
- terminal.rows = 1;
- assert.equal(scrollAreaElement.style.height, 0 * CHARACTER_HEIGHT + 'px');
- viewport.syncScrollArea();
- assert.equal(viewportElement.style.height, 1 * CHARACTER_HEIGHT + 'px');
- assert.equal(scrollAreaElement.style.height, 1 * CHARACTER_HEIGHT + 'px');
- terminal.lines.push('');
- viewport.syncScrollArea();
- assert.equal(viewportElement.style.height, 1 * CHARACTER_HEIGHT + 'px');
- assert.equal(scrollAreaElement.style.height, 2 * CHARACTER_HEIGHT + 'px');
- });
- });
-});
"module": "commonjs",
"target": "es5",
"rootDir": "src",
- "allowJs": true
+ "allowJs": true,
+ "outDir": "out"
},
"exclude": [
"addons",
"build",
"demo",
+ "dist",
"out",
"test",
"node_modules"