[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114308: * test/automated/eshell (eshell-test/for-na
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r114308: * test/automated/eshell (eshell-test/for-name-shadow-loop): Tweak previous |
Date: |
Mon, 16 Sep 2013 19:20:47 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114308
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2013-09-16 15:20:44 -0400
message:
* test/automated/eshell (eshell-test/for-name-shadow-loop): Tweak previous
modified:
test/automated/eshell.el eshtest.el-20091113204419-o5vbwnq5f7feedwu-1875
=== modified file 'test/automated/eshell.el'
--- a/test/automated/eshell.el 2013-09-16 18:42:41 +0000
+++ b/test/automated/eshell.el 2013-09-16 19:20:44 +0000
@@ -51,6 +51,9 @@
(goto-char eshell-last-input-end)
(looking-at regexp))
+;; FIXME this does not return informative failure messages, just t or nil.
+;; It should return the expected buffer contents and the actual one,
+;; so that we can see what form ant failure took.
(defun eshell-command-result-p (text regexp &optional func)
"Insert a command at the end of the buffer."
(eshell-insert-command text func)
@@ -89,10 +92,10 @@
(ert-deftest eshell-test/for-name-shadow-loop () ; bug#15372
"Test `eshell-command-result' with a for loop using an env-var."
(let ((process-environment (cons "name=env-value" process-environment)))
- (should (equal (eshell-test-command-result "echo $name") "env-value"))
- (should (equal (eshell-test-command-result
- "for name in 3 { echo $name }") 3))
- (should (equal (eshell-test-command-result "echo $name") "env-value"))))
+ (with-temp-eshell
+ (should
+ (eshell-command-result-p "echo $name; for name in 3 { echo $name }; echo
$name"
+ "env-value\n3\nenv-value\n")))))
(ert-deftest eshell-test/lisp-command-args ()
"Test `eshell-command-result' with elisp and trailing args.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114308: * test/automated/eshell (eshell-test/for-name-shadow-loop): Tweak previous,
Glenn Morris <=