]> git.eshelyaron.com Git - emacs.git/commitdiff
* test/automated/eshell.el (eshell-test/for-loop, eshell-test/for-name-loop):
authorGlenn Morris <rgm@gnu.org>
Fri, 13 Sep 2013 17:13:52 +0000 (13:13 -0400)
committerGlenn Morris <rgm@gnu.org>
Fri, 13 Sep 2013 17:13:52 +0000 (13:13 -0400)
Ensure environment variables don't confuse us.

test/ChangeLog
test/automated/eshell.el

index 4330b77e21e32cdb9478bfd4a5137e27af4fed23..21b22425fb68d28ab99bb8087e1ce7fe72927679 100644 (file)
@@ -4,6 +4,8 @@
        Use a temp directory for eshell-directory-name.
        (eshell-test-command-result): New, again using a temp directory.
        Replace eshell-command-result with this throughout.
+       (eshell-test/for-loop, eshell-test/for-name-loop):
+       Ensure environment variables don't confuse us.
 
 2013-09-12  Glenn Morris  <rgm@gnu.org>
 
index f9061ceb57ce13c4de69653186c98460ed404d0e..b9eb31660f1e177acef244f11c2e2867a5a2762f 100644 (file)
 
 (ert-deftest eshell-test/for-loop ()
   "Test `eshell-command-result' with an elisp command."
-  (should (equal (eshell-test-command-result "for foo in 5 { echo $foo }") 5)))
+  (let ((process-environment (cons "foo" process-environment)))
+    (should (equal (eshell-test-command-result
+                    "for foo in 5 { echo $foo }") 5))))
 
 (ert-deftest eshell-test/for-name-loop () ;Bug#15231
   "Test `eshell-command-result' with an elisp command."
-  (should (equal (eshell-test-command-result "for name in 3 { echo $name }") 3)))
+  (let ((process-environment (cons "name" process-environment)))
+    (should (equal (eshell-test-command-result
+                    "for name in 3 { echo $name }") 3))))
 
 (ert-deftest eshell-test/lisp-command-args ()
   "Test `eshell-command-result' with elisp and trailing args.