[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 08/12: don't assume temporary file directory name
From: |
Eric Schulte |
Subject: |
[elpa] 08/12: don't assume temporary file directory name |
Date: |
Wed, 07 May 2014 03:10:59 +0000 |
eschulte pushed a commit to branch master
in repository elpa.
commit 9a4d4b7a6de64aaa8f2ce8ed89b9cee37de898a5
Author: Eric Schulte <address@hidden>
Date: Fri May 2 09:25:52 2014 -0600
don't assume temporary file directory name
Instead use temporary-file-directory. Hopefully this helps for
testing on windows.
---
web-server-test.el | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/web-server-test.el b/web-server-test.el
index 769d203..a11093c 100644
--- a/web-server-test.el
+++ b/web-server-test.el
@@ -195,15 +195,21 @@
org=-+one%0A-+two%0A-+three%0A-+four%0A%0A&beg=646&end=667&path=%2Fcomplex.org")
"you said \"foo\"\n"))))
(ert-deftest ws/in-directory-p ()
- (should-not (ws-in-directory-p "/tmp/" "foo/bar/../../../"))
- (should (ws-in-directory-p "/tmp/" "foo/bar/../../../tmp/baz"))
- (should (ws-in-directory-p "/tmp/" "./"))
- (should-not (ws-in-directory-p "/tmp/" "/~/pics"))
- (should-not (ws-in-directory-p "/tmp/" "~/pics"))
- (should-not (ws-in-directory-p "/tmp/" "/pics"))
- (should-not (ws-in-directory-p "/tmp/" "../pics"))
- (should (ws-in-directory-p "/tmp/" "pics"))
- (should-not (ws-in-directory-p "/tmp/" "..")))
+ (mapc (lambda (pair)
+ (let ((should-or-not (car pair))
+ (dir (cdr pair)))
+ (should
+ (funcall (if should-or-not #'identity #'not)
+ (ws-in-directory-p temporary-file-directory dir)))))
+ `((nil . "foo/bar/../../../")
+ (t . ,(concat "foo/bar/../../../" temporary-file-directory "/baz"))
+ (t . "./")
+ (nil . "/~/pics")
+ (nil . "~/pics")
+ (nil . "/pics")
+ (nil . "../pics")
+ (t . "pics")
+ (nil . ".."))))
(ert-deftest ws/parse-basic-authorization ()
"Test that a number of headers parse successfully."
- [elpa] branch master updated (2d2431c -> 37fc443), Eric Schulte, 2014/05/06
- [elpa] 02/12: ws-in-directory-p parent should be expanded, Eric Schulte, 2014/05/06
- [elpa] 08/12: don't assume temporary file directory name,
Eric Schulte <=
- [elpa] 03/12: Corrected example in ws-start docstring, Eric Schulte, 2014/05/06
- [elpa] 04/12: Merge pull request #3 from thesoftwarebin/master, Eric Schulte, 2014/05/06
- [elpa] 05/12: remove coding conversion from main network process, Eric Schulte, 2014/05/06
- [elpa] 06/12: pass the silent flag to curl for all request types, Eric Schulte, 2014/05/06
- [elpa] 09/12: increasingly windows robustness of tests, Eric Schulte, 2014/05/06
- [elpa] 07/12: TODO pass all tests on Windows [0/2], Eric Schulte, 2014/05/06
- [elpa] 10/12: passing all tests on Windows, Eric Schulte, 2014/05/06
- [elpa] 12/12: Merge commit 'aecfbcbc10cf03ec94062ac3e590f8118e5a0434', Eric Schulte, 2014/05/06
- [elpa] 01/12: Fix up copyright headers., Eric Schulte, 2014/05/06
- [elpa] 11/12: bump version to 0.1.1, Eric Schulte, 2014/05/06