mirror of
				https://git.proxmox.com/git/mirror_xterm.js
				synced 2025-10-31 16:05:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			658 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			658 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 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);
 | |
|   });
 | |
| });
 | 
