summaryrefslogtreecommitdiff
path: root/test/lisp/eshell/em-alias-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/eshell/em-alias-tests.el')
-rw-r--r--test/lisp/eshell/em-alias-tests.el28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/lisp/eshell/em-alias-tests.el b/test/lisp/eshell/em-alias-tests.el
index 497159e3460..aca622220e3 100644
--- a/test/lisp/eshell/em-alias-tests.el
+++ b/test/lisp/eshell/em-alias-tests.el
@@ -38,50 +38,50 @@
"Test a simple alias with no arguments"
(with-temp-eshell
(eshell-insert-command "alias say-hi 'echo hi'")
- (eshell-command-result-p "say-hi" "hi\n")
- (eshell-command-result-p "say-hi bye" "hi\n")))
+ (eshell-match-command-output "say-hi" "hi\n")
+ (eshell-match-command-output "say-hi bye" "hi\n")))
(ert-deftest em-alias-test/alias-arg-vars ()
"Test alias with $0, $1, ... variables"
(with-temp-eshell
(eshell-insert-command "alias show-args 'printnl $0 \"$1 $2\"'")
- (eshell-command-result-p "show-args one two" "show-args\none two\n")))
+ (eshell-match-command-output "show-args one two" "show-args\none two\n")))
(ert-deftest em-alias-test/alias-arg-vars-indices ()
"Test alias with $1, $2, ... variables using indices"
(with-temp-eshell
(eshell-insert-command "alias funny-sum '+ $1[0] $2[1]'")
- (eshell-command-result-p "funny-sum (list 1 2) (list 3 4)"
- "5\n")))
+ (eshell-match-command-output "funny-sum (list 1 2) (list 3 4)"
+ "5\n")))
(ert-deftest em-alias-test/alias-arg-vars-split-indices ()
"Test alias with $0, $1, ... variables using split indices"
(with-temp-eshell
(eshell-insert-command "alias my-prefix 'echo $0[- 0]'")
- (eshell-command-result-p "my-prefix"
- "my\n")
+ (eshell-match-command-output "my-prefix"
+ "my\n")
(eshell-insert-command "alias funny-sum '+ $1[: 0] $2[: 1]'")
- (eshell-command-result-p "funny-sum 1:2 3:4"
- "5\n")))
+ (eshell-match-command-output "funny-sum 1:2 3:4"
+ "5\n")))
(ert-deftest em-alias-test/alias-all-args-var ()
"Test alias with the $* variable"
(with-temp-eshell
(eshell-insert-command "alias show-all-args 'printnl $*'")
- (eshell-command-result-p "show-all-args" "\\`\\'")
- (eshell-command-result-p "show-all-args a" "a\n")
- (eshell-command-result-p "show-all-args a b c" "a\nb\nc\n")))
+ (eshell-match-command-output "show-all-args" "\\`\\'")
+ (eshell-match-command-output "show-all-args a" "a\n")
+ (eshell-match-command-output "show-all-args a b c" "a\nb\nc\n")))
(ert-deftest em-alias-test/alias-all-args-var-indices ()
"Test alias with the $* variable using indices"
(with-temp-eshell
(eshell-insert-command "alias add-pair '+ $*[0] $*[1]'")
- (eshell-command-result-p "add-pair 1 2" "3\n")))
+ (eshell-match-command-output "add-pair 1 2" "3\n")))
(ert-deftest em-alias-test/alias-all-args-var-split-indices ()
"Test alias with the $* variable using split indices"
(with-temp-eshell
(eshell-insert-command "alias add-funny-pair '+ $*[0][: 0] $*[1][: 1]'")
- (eshell-command-result-p "add-funny-pair 1:2 3:4" "5\n")))
+ (eshell-match-command-output "add-funny-pair 1:2 3:4" "5\n")))
;; em-alias-tests.el ends here