Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
peach-html5-editor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
implement rest of tokenizer states
[peach-html5-editor.git]
/
test.coffee
diff --git
a/test.coffee
b/test.coffee
index
9e82bdd
..
3098bbd
100644
(file)
--- a/
test.coffee
+++ b/
test.coffee
@@
-7390,6
+7390,7
@@
tests = [
expected: "| <frame>\n"
}, {
name: "tests_innerHTML_1.dat #85"
expected: "| <frame>\n"
}, {
name: "tests_innerHTML_1.dat #85"
+ html: ""
fragment: "html"
expected: "| <head>\n| <body>\n"
}, {
fragment: "html"
expected: "| <head>\n| <body>\n"
}, {
@@
-7832,6
+7833,8
@@
test_parser = (args) ->
# console.log str
console.log "FAILED: \"#{args.name}\""
console.log " Input: #{args.html}"
# console.log str
console.log "FAILED: \"#{args.name}\""
console.log " Input: #{args.html}"
+ if args.fragment?
+ console.log " Fragment: #{args.fragment}"
console.log " Correct: #{args.expected}"
console.log " Output: #{serialized}"
if parse_errors.length > 0
console.log " Correct: #{args.expected}"
console.log " Output: #{serialized}"
if parse_errors.length > 0
@@
-7843,8
+7846,7
@@
test_parser = (args) ->
console.log "passed \"#{args.name}\""
test_results.passed += 1
test_summary = ->
console.log "passed \"#{args.name}\""
test_results.passed += 1
test_summary = ->
- console.log "Tests passed: #{test_results.passed}"
- console.log "Tests Failed: #{test_results.failed}"
+ console.log "Tests passed: #{test_results.passed}, Tests Failed: #{test_results.failed}"
next_test = 0
next_test = 0
@@
-7852,11
+7854,12
@@
run_tests_and_breathe = ->
start_time = new Date()
loop
if next_test >= tests.length
start_time = new Date()
loop
if next_test >= tests.length
+ test_summary()
return
test_parser tests[next_test]
next_test += 1
now = new Date()
if now - start_time > 100 # miliseconds
return
test_parser tests[next_test]
next_test += 1
now = new Date()
if now - start_time > 100 # miliseconds
- setTimeout run_tests_and_breathe, 1
+ break
+ setTimeout run_tests_and_breathe, 1
run_tests_and_breathe()
run_tests_and_breathe()
-test_summary()