diff options
Diffstat (limited to 'test/lisp/eshell/eshell-tests.el')
| -rw-r--r-- | test/lisp/eshell/eshell-tests.el | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el index 5dc18775485..8423500ea7d 100644 --- a/test/lisp/eshell/eshell-tests.el +++ b/test/lisp/eshell/eshell-tests.el | |||
| @@ -36,59 +36,6 @@ | |||
| 36 | 36 | ||
| 37 | ;;; Tests: | 37 | ;;; Tests: |
| 38 | 38 | ||
| 39 | (ert-deftest eshell-test/simple-command-result () | ||
| 40 | "Test `eshell-command-result' with a simple command." | ||
| 41 | (should (equal (eshell-test-command-result "+ 1 2") 3))) | ||
| 42 | |||
| 43 | (ert-deftest eshell-test/lisp-command () | ||
| 44 | "Test `eshell-command-result' with an elisp command." | ||
| 45 | (should (equal (eshell-test-command-result "(+ 1 2)") 3))) | ||
| 46 | |||
| 47 | (ert-deftest eshell-test/lisp-command-with-quote () | ||
| 48 | "Test `eshell-command-result' with an elisp command containing a quote." | ||
| 49 | (should (equal (eshell-test-command-result "(eq 'foo nil)") nil))) | ||
| 50 | |||
| 51 | (ert-deftest eshell-test/for-loop () | ||
| 52 | "Test `eshell-command-result' with a for loop.." | ||
| 53 | (let ((process-environment (cons "foo" process-environment))) | ||
| 54 | (should (equal (eshell-test-command-result | ||
| 55 | "for foo in 5 { echo $foo }") 5)))) | ||
| 56 | |||
| 57 | (ert-deftest eshell-test/for-name-loop () ;Bug#15231 | ||
| 58 | "Test `eshell-command-result' with a for loop using `name'." | ||
| 59 | (let ((process-environment (cons "name" process-environment))) | ||
| 60 | (should (equal (eshell-test-command-result | ||
| 61 | "for name in 3 { echo $name }") 3)))) | ||
| 62 | |||
| 63 | (ert-deftest eshell-test/for-name-shadow-loop () ; bug#15372 | ||
| 64 | "Test `eshell-command-result' with a for loop using an env-var." | ||
| 65 | (let ((process-environment (cons "name=env-value" process-environment))) | ||
| 66 | (with-temp-eshell | ||
| 67 | (eshell-command-result-p "echo $name; for name in 3 { echo $name }; echo $name" | ||
| 68 | "env-value\n3\nenv-value\n")))) | ||
| 69 | |||
| 70 | (ert-deftest eshell-test/lisp-command-args () | ||
| 71 | "Test `eshell-command-result' with elisp and trailing args. | ||
| 72 | Test that trailing arguments outside the S-expression are | ||
| 73 | ignored. e.g. \"(+ 1 2) 3\" => 3" | ||
| 74 | (should (equal (eshell-test-command-result "(+ 1 2) 3") 3))) | ||
| 75 | |||
| 76 | (ert-deftest eshell-test/subcommand () | ||
| 77 | "Test `eshell-command-result' with a simple subcommand." | ||
| 78 | (should (equal (eshell-test-command-result "{+ 1 2}") 3))) | ||
| 79 | |||
| 80 | (ert-deftest eshell-test/subcommand-args () | ||
| 81 | "Test `eshell-command-result' with a subcommand and trailing args. | ||
| 82 | Test that trailing arguments outside the subcommand are ignored. | ||
| 83 | e.g. \"{+ 1 2} 3\" => 3" | ||
| 84 | (should (equal (eshell-test-command-result "{+ 1 2} 3") 3))) | ||
| 85 | |||
| 86 | (ert-deftest eshell-test/subcommand-lisp () | ||
| 87 | "Test `eshell-command-result' with an elisp subcommand and trailing args. | ||
| 88 | Test that trailing arguments outside the subcommand are ignored. | ||
| 89 | e.g. \"{(+ 1 2)} 3\" => 3" | ||
| 90 | (should (equal (eshell-test-command-result "{(+ 1 2)} 3") 3))) | ||
| 91 | |||
| 92 | (ert-deftest eshell-test/pipe-headproc () | 39 | (ert-deftest eshell-test/pipe-headproc () |
| 93 | "Check that piping a non-process to a process command waits for the process" | 40 | "Check that piping a non-process to a process command waits for the process" |
| 94 | (skip-unless (executable-find "cat")) | 41 | (skip-unless (executable-find "cat")) |