Skip to content

Commit

Permalink
test for relative windows paths
Browse files Browse the repository at this point in the history
  • Loading branch information
wvanderdeijl committed May 30, 2016
1 parent 15a73bf commit 02145da
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,31 @@ describe('gulp-rev-all', function () {

});

it('windows path', function () {

var base = 'c:\\first\\second';

var file = new Gutil.File({
path: 'c:\\first\\second\\third\\index.html',
base: base
});

var fileReference = new Gutil.File({
path: 'c:\\first\\second\\third\\fourth\\other.html',
base: base
});

file.revPathOriginal = file.path;
fileReference.revPathOriginal = fileReference.path;

var references = Tool.get_reference_representations_relative(fileReference, file);

references.length.should.equal(2);
references[0].should.equal('fourth/other.html');
references[1].should.equal('./fourth/other.html');

});

});

describe('should resolve references that have 1 traversals', function () {
Expand Down

0 comments on commit 02145da

Please sign in to comment.