From c9b06645de2e0ceff23272de930418fb66b870e0 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Tue, 13 Mar 2018 17:15:03 +0100 Subject: Start adding tests --- test/tests/filter-directory-visited-tags.success | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/tests/filter-directory-visited-tags.success (limited to 'test/tests/filter-directory-visited-tags.success') diff --git a/test/tests/filter-directory-visited-tags.success b/test/tests/filter-directory-visited-tags.success new file mode 100644 index 0000000..527ee5a --- /dev/null +++ b/test/tests/filter-directory-visited-tags.success @@ -0,0 +1,25 @@ +#!/bin/sh + +. "$(cd -- "$(dirname -- "$0")" && pwd -P)/../bootstrap.sh" + +initializeRepositories + +"${BIN_MAIN}" "${DIR_SOURCE}" '--prune-empty --subdirectory-filter subdir' "${DIR_DESTINATION}" + +echo 'Fetching tags' +tags=$(getTagList "${DIR_DESTINATION}") +if itemInList 'tag-01' "${tags}" +then + printf '%s should not be in tag list:\n%s\n' 'tag-01' "${tags}" >&2 + exit 1 +fi +if itemNotInList 'tag-02' "${tags}" +then + printf '%s should be in tag list:\n%s\n' 'tag-02' "${tags}" >&2 + exit 1 +fi +if itemInList 'tag-03' "${tags}" +then + printf '%s should not be in tag list:\n%s\n' 'tag-02' "${tags}" >&2 + exit 1 +fi -- cgit v1.2.3