You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Jason Smith (Updated) (JIRA)" <ji...@apache.org> on 2012/02/23 06:41:48 UTC

[jira] [Updated] (COUCHDB-1417) Running individual JS tests at the CLI fails

     [ https://issues.apache.org/jira/browse/COUCHDB-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Smith updated COUCHDB-1417:
---------------------------------

    Attachment: A_0001-Force-semicolon-insertion-preventing-semantic-errors.patch

Attached patch against 1.2.x solves this problem. It is also available at

https://github.com/jhs/couchdb/commit/e86b3de75f7de27d760dbf6537e9b4d4866554ec

My branch for this work is:

https://github.com/jhs/couchdb/tree/COUCHDB-1417
                
> Running individual JS tests at the CLI fails
> --------------------------------------------
>
>                 Key: COUCHDB-1417
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1417
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Test Suite
>    Affects Versions: 1.2
>            Reporter: Jason Smith
>            Priority: Minor
>         Attachments: A_0001-Force-semicolon-insertion-preventing-semantic-errors.patch
>
>
> Running the following in the 1.2.x branch does not work:
>     $ ./test/javascript/run share/www/script/test/rewrite.js 
>     [couchjs] Error: No XMLHTTPRequest support detected
> The cause is that the runner concatenates several files into one script:
>     cat couchdb/share/www/script/json2.js couchdb/share/www/script/sha1.js couchdb/share/www/script/oauth.js couchdb/share/www/script/couch.js couchdb/share/www/script/couch_test_runner.js couchdb/share/www/script/couch_tests.js share/www/script/test/rewrite.js couchdb/test/javascript/couch_http.js couchdb/test/javascript/cli_runner.js
> If the final statement before couch_http.js is missing a semicolon, then couch_http.js will look like a function invocation.
> The fix is to modify couch_http.js to be completely protected from whatever statements may have preceded it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira