mirror of
https://git.proxmox.com/git/mirror_xterm.js
synced 2025-11-07 05:30:54 +00:00
Remove no longer valid clipboard test and add new one
This commit is contained in:
parent
a53a0acd65
commit
8b1067d180
@ -4,16 +4,10 @@ import * as Clipboard from './Clipboard';
|
|||||||
|
|
||||||
|
|
||||||
describe('evaluateCopiedTextProcessing', function () {
|
describe('evaluateCopiedTextProcessing', function () {
|
||||||
it('should strip trailing whitespaces and replace nbsps with spaces', function () {
|
it('should replace non-breaking spaces with regular spaces', () => {
|
||||||
let nonBreakingSpace = String.fromCharCode(160),
|
const nbsp = String.fromCharCode(160);
|
||||||
copiedText = 'echo' + nonBreakingSpace + 'hello' + nonBreakingSpace,
|
const result = Clipboard.prepareTextForClipboard(`foo${nbsp}bar\ntest${nbsp}${nbsp}`);
|
||||||
processedText = Clipboard.prepareTextForClipboard(copiedText);
|
assert.equal(result, 'foo bar\ntest ');
|
||||||
|
|
||||||
// No trailing spaces
|
|
||||||
assert.equal(processedText.match(/\s+$/), null);
|
|
||||||
|
|
||||||
// No non-breaking space
|
|
||||||
assert.equal(processedText.indexOf(nonBreakingSpace), -1);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user