mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-15 03:04:37 +03:00
Fix path to specs. Now spec-suite runs.
This commit is contained in:
parent
0ec5c9a4fa
commit
b99c4deb49
@ -79,7 +79,7 @@ bool NativeHandler::Execute(const CefString& name,
|
|||||||
retval = CefV8Value::CreateArray();
|
retval = CefV8Value::CreateArray();
|
||||||
for (NSUInteger i = 0; i < relativePaths.count; i++) {
|
for (NSUInteger i = 0; i < relativePaths.count; i++) {
|
||||||
NSString *relativePath = [relativePaths objectAtIndex:i];
|
NSString *relativePath = [relativePaths objectAtIndex:i];
|
||||||
NSString *fullPath = [path stringByAppendingString:relativePath];
|
NSString *fullPath = [path stringByAppendingPathComponent:relativePath];
|
||||||
retval->SetValue(i, CefV8Value::CreateString([fullPath UTF8String]));
|
retval->SetValue(i, CefV8Value::CreateString([fullPath UTF8String]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
fs = require 'fs'
|
fs = require 'fs'
|
||||||
|
|
||||||
require 'spec-helper'
|
require 'spec-helper'
|
||||||
require path for path in fs.listDirectoryTree(require.resolve '.') when /-spec\.coffee$/.test path
|
|
||||||
|
require path for path in fs.listDirectoryTree($atom.loadPath + "/spec") when /-spec\.coffee$/.test path
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
resourcePath = $atom.loadPath
|
|
||||||
|
|
||||||
paths = [
|
paths = [
|
||||||
"#{resourcePath}/spec"
|
"#{$atom.loadPath}/spec"
|
||||||
"#{resourcePath}/src/stdlib"
|
"#{$atom.loadPath}/src/stdlib"
|
||||||
"#{resourcePath}/src/atom"
|
"#{$atom.loadPath}/src/atom"
|
||||||
"#{resourcePath}/src"
|
"#{$atom.loadPath}/src"
|
||||||
"#{resourcePath}/extensions"
|
"#{$atom.loadPath}/extensions"
|
||||||
"#{resourcePath}/vendor"
|
"#{$atom.loadPath}/vendor"
|
||||||
"#{resourcePath}/static"
|
"#{$atom.loadPath}/static"
|
||||||
]
|
]
|
||||||
|
|
||||||
window.__filename = null
|
window.__filename = null
|
||||||
@ -73,7 +71,7 @@ resolve = (file) ->
|
|||||||
file = file.replace '../', "#{prefix}/"
|
file = file.replace '../', "#{prefix}/"
|
||||||
|
|
||||||
if file[0] isnt '/'
|
if file[0] isnt '/'
|
||||||
require.paths.some (path) ->
|
paths.some (path) ->
|
||||||
fileExists = /\.(.+)$/.test(file) and __exists "#{path}/#{file}"
|
fileExists = /\.(.+)$/.test(file) and __exists "#{path}/#{file}"
|
||||||
jsFileExists = not /\.(.+)$/.test(file) and __exists "#{path}/#{file}.js"
|
jsFileExists = not /\.(.+)$/.test(file) and __exists "#{path}/#{file}.js"
|
||||||
|
|
||||||
@ -121,7 +119,6 @@ this.require = require
|
|||||||
this.nakedLoad = nakedLoad
|
this.nakedLoad = nakedLoad
|
||||||
this.define = define
|
this.define = define
|
||||||
|
|
||||||
this.require.resourcePath = resourcePath
|
|
||||||
this.require.paths = paths
|
this.require.paths = paths
|
||||||
this.require.exts = exts
|
this.require.exts = exts
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user