Commit b95956a
authored
Implement better way to test for in-memory file (#645)
* Implement better way to test for in-memory file
Fix #569
PSES would crash quite often when the user viewed a ps1 file in a diff window
or an earlier version using GitLens.
This approach using the System.Uri class that can detect file vs other schemes.
URI chokes on relative file paths. In this case, we fall back to the previous
approach of using Path.GetFullPath().
* Add unit tests and PTLE catch - just in case.
* Use test cases and a single Assert.
* Remove test value for verifying we get msg on test fail1 parent 2523e71 commit b95956a
File tree
2 files changed
+57
-15
lines changed- src/PowerShellEditorServices/Workspace
- test/PowerShellEditorServices.Test/Session
2 files changed
+57
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
398 | 397 | | |
399 | | - | |
| 398 | + | |
400 | 399 | | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
406 | 414 | | |
407 | 415 | | |
408 | | - | |
| 416 | + | |
409 | 417 | | |
410 | 418 | | |
411 | 419 | | |
| |||
Lines changed: 37 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
10 | | - | |
11 | 8 | | |
| 9 | + | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
| |||
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
38 | 72 | | |
39 | 73 | | |
0 commit comments