merge from trunk

This commit is contained in:
Joakim Verona 2013-09-13 19:25:29 +02:00
commit d892820f93
2 changed files with 8 additions and 2 deletions

View 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>

View file

@ -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.