       describe "when a squashed directory is deleted", ->
         it "un-squashes the directories", ->
           jasmine.attachToDOM(workspaceElement)
-          piDir = $(treeView.roots[0].entries).find(".directory:contains(omicron#{path.sep}pi):first")[0]
+          if path.sep is '\\'
+            # First escape the backslashes for Coffeescript, then escape them for jQuery
+            piDir = $(treeView.roots[0].entries).find(".directory:contains(omicron\\\\pi):first")[0]
+          else
+            piDir = $(treeView.roots[0].entries).find(".directory:contains(omicron#{path.sep}pi):first")[0]
+
           treeView.focus()
           treeView.selectEntry(piDir)
           spyOn(atom, 'confirm').andCallFake (dialog) ->

          atom.commands.dispatch(treeView.element, 'tree-view:remove')
          expect(dirView[0].directory.updateStatus).toHaveBeenCalled()

    describe "when the project is a symbolic link to the repository root", ->
      beforeEach ->
        symlinkPath = temp.path('tree-view-project')
        fs.symlinkSync(projectPath, symlinkPath, 'junction')

      describe "when a file is created within a directory with another squashed directory", ->
        it "un-squashes the directories", ->
          jasmine.attachToDOM(workspaceElement)
          if path.sep is '\\'
            # First escape the backslashes for Coffeescript, then escape them for jQuery
            piDir = $(treeView.roots[0].entries).find(".directory:contains(omicron\\\\pi):first")[0]
          else
            piDir = $(treeView.roots[0].entries).find(".directory:contains(omicron#{path.sep}pi):first")[0]
          expect(piDir).not.toBeNull()
          # omicron is a squashed dir, so searching for omicron would give us omicron/pi instead
          omicronPath = piDir.getPath().replace "#{path.sep}pi", ""
