File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ describe('Text Helpers', () => {
23
23
content : 'doSomethingElse() {\n throw new Error(\'Nope!\');\n}' ,
24
24
selection : new Selection ( 7 , 2 , 9 , 3 )
25
25
} ;
26
+ const testSelection3 : TestSelection = {
27
+ content : '}\n\ndoSomethingElse() {' ,
28
+ selection : new Selection ( 5 , 0 , 7 , 21 )
29
+ } ;
26
30
let document : TextDocument ;
27
31
28
32
before ( async ( ) => {
@@ -61,6 +65,12 @@ describe('Text Helpers', () => {
61
65
) ;
62
66
} ) ;
63
67
68
+ it ( 'generates the correct text when selection contains empty line' , ( ) => {
69
+ assert . deepEqual ( testSelection3 . content ,
70
+ generateCopyableText ( document , testSelection3 . selection )
71
+ ) ;
72
+ } ) ;
73
+
64
74
context ( 'wrapTextInMarkdownCodeBlock' , ( ) => {
65
75
it ( 'returns the text wrapped in a Markdown code block' , ( ) => {
66
76
const codeSnippet = 'console.log("Yo");' ;
You can’t perform that action at this time.
0 commit comments