From 282b96ddd9a84b740788c2358ec0f5fedafb7cc6 Mon Sep 17 00:00:00 2001 From: Noah Slater Date: Mon, 6 Jul 2009 00:33:50 +0000 Subject: trimmed trailing whitespace git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@791350 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/attachment_names.js | 54 +++++++++++++++---------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'share/www/script/test/attachment_names.js') diff --git a/share/www/script/test/attachment_names.js b/share/www/script/test/attachment_names.js index 3c694dd0..f9c846eb 100644 --- a/share/www/script/test/attachment_names.js +++ b/share/www/script/test/attachment_names.js @@ -10,21 +10,21 @@ // License for the specific language governing permissions and limitations under // the License. -couchTests.attachment_names = function(debug) { - var db = new CouchDB("test_suite_db"); - db.deleteDb(); - db.createDb(); - if (debug) debugger; - - var binAttDoc = { - _id: "bin_doc", - _attachments:{ - "foo\x80txt": { - content_type:"text/plain", - data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=" - } - } - } +couchTests.attachment_names = function(debug) { + var db = new CouchDB("test_suite_db"); + db.deleteDb(); + db.createDb(); + if (debug) debugger; + + var binAttDoc = { + _id: "bin_doc", + _attachments:{ + "foo\x80txt": { + content_type:"text/plain", + data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=" + } + } + } // inline attachments try { @@ -38,7 +38,7 @@ couchTests.attachment_names = function(debug) { // standalone docs var bin_data = "JHAPDO*AU£PN ){(3u[d 93DQ9¡€])} ææøo'∂ƒæ≤çæππ•¥∫¶®#†π¶®¥π€ª®˙π8np"; - + var xhr = (CouchDB.request("PUT", "/test_suite_db/bin_doc3/attachment\x80txt", { headers:{"Content-Type":"text/plain;charset=utf-8"}, body:bin_data @@ -64,15 +64,15 @@ couchTests.attachment_names = function(debug) { // leading underscores - var binAttDoc = { - _id: "bin_doc2", - _attachments:{ - "_foo.txt": { - content_type:"text/plain", - data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=" - } - } - } + var binAttDoc = { + _id: "bin_doc2", + _attachments:{ + "_foo.txt": { + content_type:"text/plain", + data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=" + } + } + } try { db.save(binAttDoc); @@ -80,8 +80,8 @@ couchTests.attachment_names = function(debug) { } catch (e) { TEquals("bad_request", e.error, "attachment_name: leading underscore"); TEquals("Attachment name can't start with '_'", e.reason, "attachment_name: leading underscore"); - } - + } + // todo: form uploads, waiting for cmlenz' test case for form uploads }; -- cgit v1.2.3