[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dtache c70c9366a5 028/158: Update test to test with/wit
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dtache c70c9366a5 028/158: Update test to test with/without dtache-env |
Date: |
Wed, 19 Jan 2022 18:57:41 -0500 (EST) |
branch: externals/dtache
commit c70c9366a5b02a0c8ca28673c89f2ea6ace0dab3
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Update test to test with/without dtache-env
---
test/dtache-test.el | 32 ++++++++++++++++++++++++++------
1 file changed, 26 insertions(+), 6 deletions(-)
diff --git a/test/dtache-test.el b/test/dtache-test.el
index b5edada4d2..283ea61c81 100644
--- a/test/dtache-test.el
+++ b/test/dtache-test.el
@@ -184,20 +184,40 @@
(should (equal session (car (dtache--db-select-sessions)))))))
(ert-deftest dtache-test-magic-command ()
- ;; Redirect only
- (let* ((dtache-shell-program "bash")
+ ;; Redirect only without dtache-env
+ (let* ((dtache-env nil)
+ (dtache-shell-program "bash")
(actual
(dtache--magic-command
(dtache--session-create :id "12345" :session-directory
"/tmp/dtache/" :command "ls" :redirect-only t)))
- (expected "{ dtache-env bash -c -i \\\"ls\\\"; } &>
/tmp/dtache/12345.log"))
+ (expected "{ (bash -c ls); } &> /tmp/dtache/12345.log"))
(should (string= actual expected)))
- ;; Normal
- (let* ((dtache-shell-program "bash")
+ ;; Normal without dtache-env
+ (let* ((dtache-env nil)
+ (dtache-shell-program "bash")
(actual
(dtache--magic-command
(dtache--session-create :id "12345" :session-directory
"/tmp/dtache/" :command "ls")))
- (expected "{ dtache-env bash -c -i \\\"ls\\\"; } 2>&1 | tee
/tmp/dtache/12345.log"))
+ (expected "{ (bash -c ls); } 2>&1 | tee /tmp/dtache/12345.log"))
+ (should (string= actual expected)))
+
+ ;; Redirect only with dtache-env
+ (let* ((dtache-env "dtache-env")
+ (dtache-shell-program "bash")
+ (actual
+ (dtache--magic-command
+ (dtache--session-create :id "12345" :session-directory
"/tmp/dtache/" :command "ls" :redirect-only t)))
+ (expected "{ dtache-env ls; } &> /tmp/dtache/12345.log"))
+ (should (string= actual expected)))
+
+ ;; Normal with dtache-env
+ (let* ((dtache-env "dtache-env")
+ (dtache-shell-program "bash")
+ (actual
+ (dtache--magic-command
+ (dtache--session-create :id "12345" :session-directory
"/tmp/dtache/" :command "ls")))
+ (expected "{ dtache-env ls; } 2>&1 | tee /tmp/dtache/12345.log"))
(should (string= actual expected))))
(ert-deftest dtache-test-redirect-only-p ()
- [elpa] externals/dtache 7e8727f3a2 020/158: Add TODO to investigate unknown inactive sessions, (continued)
- [elpa] externals/dtache 7e8727f3a2 020/158: Add TODO to investigate unknown inactive sessions, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache b94baaeecd 021/158: Fix bug in setup notification, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 763246bffe 026/158: Remove explicit dependency on dtache-env, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 087e8f4c73 019/158: Update README, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache d574161815 042/158: Simplify buffer handling, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 1878cefb2f 038/158: Remove embark dependency, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 3c61776c7f 014/158: Fix dtache initialization, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 7c07950642 043/158: Implement better encapsulation of database, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 42569d1c5f 036/158: Update broken tests, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache ddf9bb6ade 039/158: Add action map example, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache c70c9366a5 028/158: Update test to test with/without dtache-env,
ELPA Syncer <=
- [elpa] externals/dtache d5aa90356a 029/158: Add CHANGELOG to project, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 4751b4d812 046/158: Implement a general timer function, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 1bc60af5a0 040/158: Update changelog and readme, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache d32b5752d6 034/158: Implement new deduplication strategy, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 36be431e18 032/158: Add workaround solution for MacOS users, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 80fca01eae 037/158: Update CHANGELOG, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 8769db2acb 051/158: Fix error in dtache-shell-attach, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache a36e89486f 055/158: Add package dtache-eshell, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache eab014faad 050/158: Version 0.2, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 9a2f4a4d43 057/158: Introduce caching variable for candidates, ELPA Syncer, 2022/01/19