Merge pull request #298 from roddhjav/fix-version-check

Fixes: version check & tests
This commit is contained in:
Jaromil 2018-01-03 16:36:16 +01:00 committed by GitHub
commit 214ec8ecbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -3,10 +3,11 @@
export test_description="Tomb regression tests"
source ./setup
autoload -U is-at-least
TOMB_VERSION=("2.3" "2.2" "2.0.1" "2.1")
zshversion=$(zsh --version | awk 'NR==1 {print $2}')
[[ $zshversion =~ "5.3" ]] && TOMB_VERSION=("2.3")
{ is-at-least "5.3" $zshversion } && TOMB_VERSION=("2.3")
for version in "${TOMB_VERSION[@]}"; do
URL="https://files.dyne.org/tomb/old-releases/Tomb-$version.tar.gz"

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/ .
SHELL := /usr/bin/zsh
SHELL := $(shell which zsh)
SHELL_PATH ?= $(SHELL)
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
RM ?= rm -f

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env zsh
#
# Copyright (c) 2008-2012 Git project
#

View File

@ -72,7 +72,6 @@ export DUMMYPASSNEW=changetest
test_cleanup() {
"${T}" slam all &> /dev/null
rm -f "/home/$USER/dyne-tomb-bind-test-"*
sudo rm -rf "$TMP"
mkdir -p "$TMP"
}

2
tomb
View File

@ -1002,7 +1002,7 @@ gpg_decrypt() {
gpgpopt=(--yes)
# GPG option '--try-secret-key' exist since GPG 2.1
{ option_is_set -R } && [[ $gpgver =~ "2.1." ]] && {
{ option_is_set -R } && { autoload -U is-at-least && is-at-least "2.1" $gpgver } && {
typeset -a recipients
recipients=(${(s:,:)$(option_value -R)})
{ is_valid_recipients $recipients } || {