Skip to content

Commit

Permalink
Merge pull request #1443 from dmethvin/1442-test-admin
Browse files Browse the repository at this point in the history
Tests: Warn if symlinks can't be created, but continue tests
  • Loading branch information
shama committed Feb 11, 2016
2 parents c8a5251 + 40ce481 commit 265a868
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/grunt/file_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ var Tempdir = require('temporary/lib/dir');
var win32 = process.platform === 'win32';

var tmpdir = new Tempdir();
fs.symlinkSync(path.resolve('test/fixtures/octocat.png'), path.join(tmpdir.path, 'octocat.png'), 'file');
fs.symlinkSync(path.resolve('test/fixtures/expand'), path.join(tmpdir.path, 'expand'), 'dir');
try {
fs.symlinkSync(path.resolve('test/fixtures/octocat.png'), path.join(tmpdir.path, 'octocat.png'), 'file');
fs.symlinkSync(path.resolve('test/fixtures/expand'), path.join(tmpdir.path, 'expand'), 'dir');
} catch (err) {
console.error('** ERROR: Cannot create symbolic links; link-related tests will fail.');
if (win32) {
console.error('** Tests must be run with Administrator privileges on Windows.');
}
}

exports['file.match'] = {
'empty set': function(test) {
Expand Down

0 comments on commit 265a868

Please sign in to comment.