diff options
author | Damien F. Katz <damien@apache.org> | 2008-05-01 12:07:52 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2008-05-01 12:07:52 +0000 |
commit | fda591cf7d4db91222d1db988f570c6039182729 (patch) | |
tree | 4afa8b4b9bfd173e44e725120975d709b1ea3f12 /share/www/script/shell.js | |
parent | d10b27ac0e6da94ae2766ac6d2701cbc0b6bef5f (diff) |
fix for compaction problem with attachments, and enhancements to JS shell, to make debugging tests easier.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@652489 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/shell.js')
-rw-r--r-- | share/www/script/shell.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/share/www/script/shell.js b/share/www/script/shell.js index f4c6aff5..4b512dc1 100644 --- a/share/www/script/shell.js +++ b/share/www/script/shell.js @@ -698,3 +698,25 @@ function go(s) // Evaluate Shell.question using _win's eval (this is why eval isn't in the |with|, IIRC). _win.location.href = "javascript:try{ Shell.printAnswer(eval('with(Shell._scope) with(Shell.shellCommands) {' + Shell.question + String.fromCharCode(10) + '}')); } catch(er) { Shell.printError(er); }; setTimeout(Shell.refocus, 0); void 0"; } + +function T(Bool) { + if(!Bool) { + throw "Error!"; + } +} + + +function makeDocs(start, end, templateDoc) { + var templateDocSrc = templateDoc ? templateDoc.toSource() : "{}" + var docs = [] + for(var i=start; i<end; i++) { + var newDoc = eval("(" + templateDocSrc + ")"); + newDoc._id = (i).toString(); + newDoc.integer = i + newDoc.string = (i).toString(); + docs.push(newDoc) + } + return docs; +} + + |