@@ -148,11 +148,24 @@ suite('createEditAddingLinksForUriList', () => {
148
148
} ;
149
149
150
150
test ( 'Should evaluate pasteAsMarkdownLink as true for selected plain text' , ( ) => {
151
- const range = new vscode . Range ( 0 , 5 , 0 , 5 ) ;
151
+ const range = new vscode . Range ( 0 , 0 , 0 , 12 ) ;
152
152
const smartPaste = checkSmartPaste ( skinnyDocument , range ) ;
153
153
assert . strictEqual ( smartPaste . pasteAsMarkdownLink , true ) ;
154
154
} ) ;
155
155
156
+ test ( 'Should evaluate pasteAsMarkdownLink as false for no selection' , ( ) => {
157
+ const range = new vscode . Range ( 0 , 0 , 0 , 0 ) ;
158
+ const smartPaste = checkSmartPaste ( skinnyDocument , range ) ;
159
+ assert . strictEqual ( smartPaste . pasteAsMarkdownLink , false ) ;
160
+ } ) ;
161
+
162
+ test ( 'Should evaluate pasteAsMarkdownLink as false for selected whitespace and new lines' , ( ) => {
163
+ skinnyDocument . getText = function ( ) { return ' \r\n\r\n' ; } ;
164
+ const range = new vscode . Range ( 0 , 0 , 0 , 7 ) ;
165
+ const smartPaste = checkSmartPaste ( skinnyDocument , range ) ;
166
+ assert . strictEqual ( smartPaste . pasteAsMarkdownLink , false ) ;
167
+ } ) ;
168
+
156
169
test ( 'Should evaluate pasteAsMarkdownLink as false for pasting within a backtick code block' , ( ) => {
157
170
skinnyDocument . getText = function ( ) { return '```\r\n\r\n```' ; } ;
158
171
const range = new vscode . Range ( 0 , 5 , 0 , 5 ) ;
0 commit comments