Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 36F0210511 for ; Thu, 5 Feb 2015 03:44:44 +0000 (UTC) Received: (qmail 23460 invoked by uid 500); 5 Feb 2015 01:58:04 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 23418 invoked by uid 500); 5 Feb 2015 01:58:04 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 23409 invoked by uid 99); 5 Feb 2015 01:58:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2015 01:58:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 00208E0496; Thu, 5 Feb 2015 01:58:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agrieve@apache.org To: commits@cordova.apache.org Date: Thu, 05 Feb 2015 01:58:04 -0000 Message-Id: <673e010b58134878b1015abed140dfc3@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/3] cordova-plugin-file git commit: Revert change to test 111 so that it passes again on Android and iOS Revert change to test 111 so that it passes again on Android and iOS Change was made in bcbeae24cd24583b7 Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/b836218d Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/b836218d Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/b836218d Branch: refs/heads/master Commit: b836218dfd438eb73ae70d28060e26c0663c0165 Parents: 58a6eb2 Author: Andrew Grieve Authored: Wed Feb 4 20:52:18 2015 -0500 Committer: Andrew Grieve Committed: Wed Feb 4 20:52:54 2015 -0500 ---------------------------------------------------------------------- tests/tests.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/b836218d/tests/tests.js ---------------------------------------------------------------------- diff --git a/tests/tests.js b/tests/tests.js index b8c6e5d..1aa9d9c 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -2695,11 +2695,15 @@ exports.defineAutoTests = function () { // lookup file system entry root.getFile('../' + fileName, { create : false - }, succeed.bind(null, done, "root.getFile('../"+fileName+ "')- Unexpected success callback, it should not traverse abvoe the root directory"), - function (error) { - expect(error).toBeDefined(); + }, function (fileEntry) { + // Note: we expect this to still resolve, as the correct behaviour is to ignore the ../, not to fail out. + expect(fileEntry).toBeDefined(); + expect(fileEntry.name).toBe(fileName); + expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath +'/' + fileName); + // cleanup + deleteEntry(fileName); done(); - }); + }, failed.bind(null, done, 'root.getFile - Error getting file: ../' + fileName)); }, failed.bind(null, done, 'createFile - Error creating file: ../' + fileName)); }); it("file.spec.112 should traverse above above the current directory", function (done) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org