branch: externals/dtache
commit 42569d1c5f4e00488af974d7b1008319dd237d73
Author: Niklas Eklund <[email protected]>
Commit: Niklas Eklund <[email protected]>
Update broken tests
---
dtache.el | 3 +--
test/dtache-test.el | 8 ++++++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dtache.el b/dtache.el
index 81a9063237..4e00d91dc8 100644
--- a/dtache.el
+++ b/dtache.el
@@ -701,8 +701,7 @@ Sessions running on current host or localhost are updated."
(defun dtache--session-truncate-command (session)
"Return a truncated string representation of SESSION's command."
- (let ((command (dtache--session-command session))
- (truncated-command))
+ (let ((command (dtache--session-command session)))
(if (<= (length command) dtache-max-command-length)
command
(concat
diff --git a/test/dtache-test.el b/test/dtache-test.el
index 283ea61c81..7d00db6aff 100644
--- a/test/dtache-test.el
+++ b/test/dtache-test.el
@@ -114,10 +114,14 @@
(ert-deftest dtache-test-session-truncate-command ()
(let ((dtache-max-command-length 7))
- (should (string= "12...78"
+ (dtache--session-truncate-command
+ (dtache--session-create :command "12345678"))
+ (should (string= "123...678"
(dtache--session-truncate-command
(dtache--session-create :command "12345678")))))
- (let ((dtache-max-command-length 6))
+ (let ((dtache-max-command-length 2))
+ (dtache--session-truncate-command
+ (dtache--session-create :command "12345678"))
(should (string= "1...8"
(dtache--session-truncate-command
(dtache--session-create :command "12345678"))))))