Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #4739, make sure UI screenshots are stored in plugin directories…
… if tests are for plugins, cleaned up path output in console and add .gitignore to DBStats plugin.
- Loading branch information
diosmosis
committed
Feb 27, 2014
1 parent
8ba7f01
commit 4ad2b98
Showing
8 changed files
with
126 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tests/UI/processed-ui-screenshots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
var fs = require('fs'), | ||
path = require('./path'); | ||
|
||
fs.commonprefixLength = function (lists) { | ||
var l = 0; | ||
|
||
var rest = lists.slice(1); | ||
|
||
while (l < lists[0].length) { | ||
for (var i = 0; i != rest.length; ++i) { | ||
var list = rest[i]; | ||
if (l == list.length | ||
|| list[l] != lists[0][l] | ||
) { | ||
return l; | ||
} | ||
} | ||
|
||
l += 1; | ||
} | ||
|
||
return l; | ||
}; | ||
|
||
// This and the helper function above are essentially the python version ported to JavaScript | ||
fs.relpath = function (p, start) { | ||
start_list = path.resolve(start).substring(1).split('/'); | ||
path_list = path.resolve(p).substring(1).split('/'); | ||
|
||
l = fs.commonprefixLength([start_list, path_list]); | ||
|
||
rel_list = [] | ||
for (var i = 0; i < start_list.length - l; ++i) { | ||
rel_list.push('..'); | ||
} | ||
|
||
rel_list.push.apply(rel_list, path_list.slice(l)); | ||
|
||
|
||
if (rel_list.length == 0) { | ||
return '.'; | ||
} | ||
|
||
return path.join.apply(null, rel_list) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters