This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JsTestDriver scripts. Basic CodeMirror init test.
- Loading branch information
1 parent
a454a7b
commit 6bbdfc8
Showing
6 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
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,18 @@ | ||
BracketsTest = TestCase("BracketsTest"); | ||
|
||
BracketsTest.prototype.testCodeMirrorInit = function() { | ||
// add #editor to document | ||
/*:DOC += <div id="editor"/> */ | ||
|
||
// init CodeMirror instance | ||
var content = 'Brackets is going to be awesome!"\n'; | ||
var myCodeMirror = CodeMirror($('#editor').get(0), { | ||
value: content | ||
}); | ||
|
||
// verify editor content | ||
assertEquals(content, myCodeMirror.getValue()); | ||
|
||
// print to console | ||
jstestdriver.console.log("CodeMirror.getValue() = ", myCodeMirror.getValue()); | ||
}; |
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,6 @@ | ||
DemoTest = TestCase("DemoTest"); | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
DemoTest.prototype.testFail = function() { | ||
// sanity check | ||
fail("fail"); | ||
}; |
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 |
---|---|---|
@@ -1,5 +1,10 @@ | ||
server: http://localhost:9876 | ||
|
||
load: | ||
- src/*.js | ||
- src-test/*.js | ||
- ../src/thirdparty/CodeMirror2/lib/*.js | ||
- ../src/thirdparty/CodeMirror2/lib/util/*.js | ||
- ../src/thirdparty/CodeMirror2/mode/javascript/javascript.js | ||
- ../src/thirdparty/*.js | ||
|
||
test: | ||
- core/*.js |
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,19 @@ | ||
#!/bin/bash | ||
while getopts "j:p:" flag | ||
do | ||
if [ $flag == "j" ]; then | ||
JSTD=$OPTARG | ||
elif [ $flag == "p" ]; then | ||
PORT=$OPTARG | ||
fi | ||
done | ||
|
||
if [ -z "$PORT" ]; then | ||
PORT=9876 | ||
fi | ||
|
||
if [ -z "$JSTD" ]; then | ||
JSTD=`ls JsTestDriver.jar` | ||
fi | ||
|
||
java -jar $JSTD --port $PORT --config jsTestDriver.conf |
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,22 @@ | ||
#!/bin/bash | ||
while getopts "j:t:" flag | ||
do | ||
if [ $flag == "j" ]; then | ||
JSTD=$OPTARG | ||
elif [ $flag == "t" ]; then | ||
TESTS=$OPTARG | ||
fi | ||
done | ||
|
||
if [ -z "$JSTD" ]; then | ||
JSTD=`ls JsTestDriver.jar` | ||
fi | ||
|
||
if [ -z "$TESTS" ]; then | ||
TESTS="all" | ||
echo "Running all tests" | ||
else | ||
echo "Running '$TESTS'" | ||
fi | ||
|
||
java -jar $JSTD --tests "$TESTS" --config jsTestDriver.conf --reset |
1 comment
on commit 6bbdfc8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
What is this demo test used for?