From ef095267402327eddc89d218fe9bedd6bfd3b880 Mon Sep 17 00:00:00 2001 From: "David Humphrey (:humph) david.humphrey@senecacollege.ca" Date: Mon, 17 Feb 2014 16:55:36 -0500 Subject: [PATCH] Add cd test for symlink'ed dir --- tests/spec/shell/cd.spec.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/spec/shell/cd.spec.js b/tests/spec/shell/cd.spec.js index 8f01264..151b703 100644 --- a/tests/spec/shell/cd.spec.js +++ b/tests/spec/shell/cd.spec.js @@ -100,5 +100,24 @@ define(["Filer", "util"], function(Filer, util) { }); }); + it('should follow symlinks to dirs', function(done) { + var fs = util.fs(); + + fs.mkdir('/dir', function(error) { + if(error) throw error; + + fs.symlink('/dir', '/link', function(error) { + if(error) throw error; + + var shell = fs.Shell(); + shell.cd('link', function(error) { + expect(error).not.to.exist; + expect(shell.cwd).to.equal('/link'); + done(); + }); + }); + }); + }); + }); });