Skip to content

Commit

Permalink
Modify the workingDirectory test to also run when the Systems PathDel…
Browse files Browse the repository at this point in the history
…imiter is not equal to $\
  • Loading branch information
cdfhalle committed May 28, 2021
1 parent bc5e337 commit cbafaac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
tests
testWorkingDirectory

| link |
link := (MarkdownLink from: 1 to: 4) url: ''.
self assert:
(link getAbsoluteUrlFromPath: MarkdownEditor new currentFilePath) pathForFile =
FileDirectory default asUrl pathForFile.
| link delimiter path |
link := (MarkdownLink from: 1 to: 4) url: 'testWorkingDir'.
self assert: (link getAbsoluteUrlFromPath: '') pathForFile
equals: FileDirectory default asUrl pathForFile, 'testWorkingDir'.

delimiter := FileDirectory pathNameDelimiter asString.
path := FileDirectory default pathName, delimiter, 'testWorkingDir', delimiter.
link url: 'testtest.jpg'.
self assert:
(link getAbsoluteUrlFromPath: FileDirectory default pathName, '\testWorkingDir\test.md') pathForFile
equals:
FileDirectory default pathName, '\testWorkingDir\testtest.jpg'.
self assert: (link getAbsoluteUrlFromPath: path, 'test.md') pathForFile
equals: path, 'testtest.jpg'.



Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
"testSetRange" : "hsl 5/19/2020 22:35",
"testStartPositionsAreUnequal" : "cg 6/29/2020 23:50",
"testUrl" : "hsl 5/28/2020 13:16",
"testWorkingDirectory" : "C.H. 5/28/2021 10:26" } }
"testWorkingDirectory" : "C.H. 5/28/2021 11:24" } }

0 comments on commit cbafaac

Please sign in to comment.