forked from xtermjs/xterm.js
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to ANSI OSC52 sequence to manipulate selection and clipboard data. The sequence specs supports multiple selections but due to the browser limitations (Clipboard API), this PR only supports manipulating the clipboard selection. Reference: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands Fixes: xtermjs#3260
- Loading branch information
1 parent
d5710af
commit 675eaaa
Showing
8 changed files
with
203 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* Copyright (c) 2020 The xterm.js authors. All rights reserved. | ||
* @license MIT | ||
*/ | ||
|
||
import { assert } from 'chai'; | ||
import { OscClipboardService } from 'common/services/OscClipboardService'; | ||
import { IOscClipboardService } from 'common/services/Services'; | ||
|
||
describe('OscClipboardService', () => { | ||
it('constructor', () => { | ||
const testData = 'Hello world!'; | ||
let oscClipboardService: IOscClipboardService; | ||
beforeEach(() => { | ||
oscClipboardService = new OscClipboardService(); | ||
}); | ||
it('should be able to write data to the clipboard', async () => { | ||
assert.ok(await oscClipboardService.putData(testData)); | ||
}); | ||
it('should be able to read data from the clipboard', async () => { | ||
const data = await oscClipboardService.readData(); | ||
assert.equal(data, testData); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.