From e16582b6bc23a1a514d27cfc38c7ddcd91622adb Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 13 Sep 2013 13:13:52 -0400 Subject: [PATCH] * test/automated/eshell.el (eshell-test/for-loop, eshell-test/for-name-loop): Ensure environment variables don't confuse us. --- test/ChangeLog | 2 ++ test/automated/eshell.el | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/ChangeLog b/test/ChangeLog index 4330b77e21e..21b22425fb6 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -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 diff --git a/test/automated/eshell.el b/test/automated/eshell.el index f9061ceb57c..b9eb31660f1 100644 --- a/test/automated/eshell.el +++ b/test/automated/eshell.el @@ -76,11 +76,15 @@ (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. -- 2.39.2