Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
f086cb4a
...
f086cb4accc4b014137e42abb939873c787202cb
authored
2013-02-25 01:42:13 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed casperjs test command argument parsing
1 parent
608108ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
bin/bootstrap.js
bin/bootstrap.js
View file @
f086cb4
...
...
@@ -108,7 +108,8 @@ CasperError.prototype = Object.getPrototypeOf(new Error());
}
if
(
!
fs
.
hasOwnProperty
(
'dirname'
))
{
fs
.
dirname
=
function
dirname
(
path
)
{
return
path
.
replace
(
/
\\
/g
,
'/'
).
replace
(
/
\/[^\/]
*$/
,
''
);
if
(
!
path
)
return
undefined
;
return
path
.
toString
().
replace
(
/
\\
/g
,
'/'
).
replace
(
/
\/[^\/]
*$/
,
''
);
};
}
if
(
!
fs
.
hasOwnProperty
(
'isWindows'
))
{
...
...
@@ -215,7 +216,7 @@ CasperError.prototype = Object.getPrototypeOf(new Error());
phantom
.
casperScript
=
fs
.
absolute
(
fs
.
pathJoin
(
baseTestsPath
,
'run.js'
));
phantom
.
casperTest
=
true
;
phantom
.
casperArgs
.
drop
(
"test"
);
phantom
.
casperScriptBaseDir
=
fs
.
dirname
(
phantom
.
casperArgs
.
get
(
1
));
phantom
.
casperScriptBaseDir
=
fs
.
dirname
(
phantom
.
casperArgs
.
get
(
0
));
}
else
if
(
phantom
.
casperArgs
.
get
(
0
)
===
"selftest"
)
{
phantom
.
casperScript
=
fs
.
absolute
(
fs
.
pathJoin
(
baseTestsPath
,
'run.js'
));
phantom
.
casperSelfTest
=
phantom
.
casperTest
=
true
;
...
...
Please
register
or
sign in
to post a comment