[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ssh-deploy 95a932a 047/133: Started on unit-tests
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ssh-deploy 95a932a 047/133: Started on unit-tests |
Date: |
Sat, 27 Mar 2021 14:48:41 -0400 (EDT) |
branch: externals/ssh-deploy
commit 95a932a01f10deb2d5106acd40f266d50a37c2b6
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Started on unit-tests
---
Makefile | 11 ++++++++++
README.md | 5 +++++
ssh-deploy-test.el | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 78 insertions(+)
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1165d6c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,11 @@
+EMACS = emacs
+ifdef emacs
+ EMACS = $(emacs)
+endif
+
+EMACS_CMD := $(EMACS) -Q -batch -L .
+
+.PHONY: tests
+tests:
+ $(EMACS_CMD) -l ssh-deploy-test.el
+
diff --git a/README.md b/README.md
index 5e5967a..916e418 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,7 @@
The `ssh-deploy` plug-in for Emacs makes it possible to effortlessly deploy
local files and directories to remote hosts via TRAMP (including but not
limited to SSH, SFTP, FTP). It tries to provide functions that can be easily
used by custom scripts.
## Features:
+
* Define syncing configuration per directory or per file (using
`DirectoryVariables` or `File Variables`)
* Control whether uploads of files should be automatic on save
* Manual downloads and uploads of directories and files
@@ -238,6 +239,10 @@ Ange-FTP defaults to `~/.netrc` so you need to add this to
your init script:
(setq ange-ftp-netrc-filename "~/.authinfo.gpg")
```
+## Tests
+
+Run `make tests` from plug-in folder to run tests, if you need to specify
specific Emacs use export syntax i.e. `export emacs="YOUR_PATH" && make tests`
+
## Read more
* <https://www.gnu.org/software/tramp/>
* <https://elpa.gnu.org/>
diff --git a/ssh-deploy-test.el b/ssh-deploy-test.el
new file mode 100644
index 0000000..d0cffbc
--- /dev/null
+++ b/ssh-deploy-test.el
@@ -0,0 +1,62 @@
+;;; ssh-deploy-test.el --- Unit and integration tests for ssh-deploy. -*-
lexical-binding:t -*-
+
+;; Copyright (C) 2017-2018 Free Software Foundation, Inc.
+
+;; Author: Christian Johansson <christian@cvj.se>
+;; Maintainer: Christian Johansson <christian@cvj.se>
+;; Created: 5 Jul 2016
+;; Modified: 28 Nov 2018
+;; Version: 3.0
+;; Keywords: tools, convenience
+;; URL: https://github.com/cjohansson/emacs-ssh-deploy
+
+;; Package-Requires: ((emacs "24"))
+
+;; This file is not part of GNU Emacs.
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 3, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+
+
+;; This file contains unit and integration tests for ssh-deploy plug-in for
Emacs.
+
+
+;;; Code:
+
+
+(autoload 'ssh-deploy-diff-mode "ssh-deploy-diff-mode")
+(autoload 'ssh-deploy "ssh-deploy")
+(autoload 'ssh-deploy--file-is-in-path "ssh-deploy")
+(autoload 'should "ert")
+
+(defun ssh-deploy-test--file-is-in-path ()
+ "Test this function."
+ (should (equal t (ssh-deploy--file-is-in-path "/mydirectory/test.txt"
"/mydirectory/")))
+ (should (equal nil (ssh-deploy--file-is-in-path "/mydirectory/test.txt"
"/mydirectory2/")))
+ (should (equal nil (ssh-deploy--file-is-in-path "/mydirectory2/test.txt"
"/mydirectory/")))
+ )
+
+
+(defun ssh-deploy-tests ()
+ "Run test for plug-in."
+ (ssh-deploy-test--file-is-in-path)
+ )
+
+(ssh-deploy-tests)
+
+
+(provide 'ssh-deploy-test)
+;;; ssh-deploy-test.el ends here
- [elpa] externals/ssh-deploy 102943f 028/133: Added pre-defined prefix key map, (continued)
- [elpa] externals/ssh-deploy 102943f 028/133: Added pre-defined prefix key map, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy afbcc70 030/133: mode-line now shows whether current file is under deployment, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 0e7c608 031/133: Deployment menu only shows when current buffer is deployment, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 8dadac5 032/133: Made menu-bar feature optional, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy b409812 033/133: Started on implementing changes to diff-mode, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 13dcacb 034/133: More cosmetic changes to diff mode, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 4268c8b 035/133: Fixed bug with constant definition, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 7be2881 038/133: Fixed proper symbols for actions, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 3c5fe09 037/133: More work on diff mode cosmetic changes, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 95a932a 047/133: Started on unit-tests,
Stefan Monnier <=
- [elpa] externals/ssh-deploy 0b43ceb 048/133: Added unit tests for get-revision-path and is-not-empty-string, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 4ff27e9 049/133: Minor modifications after suggestions from flycheck-package, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 5871711 052/133: Renamed TRAMP to Tramp and added link to lisp code style, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy e834379 053/133: Updated version, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 2388c00 056/133: Added -p suffix to predicate functions, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy bc93b81 057/133: Updated version, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 4c5b82a 062/133: Added hydra application as shortcut, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 0e98d8e 046/133: Removed unnecessary group, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy c7407ef 069/133: Using (kill-buffer) instead of reverting default-directory in unit tests, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy d9f61e1 071/133: Resolved byte-compilation with optional hydra feature, Stefan Monnier, 2021/03/27