diff options
author | Michele Locati <michele@locati.it> | 2018-03-14 17:28:02 +0100 |
---|---|---|
committer | Michele Locati <michele@locati.it> | 2018-03-14 17:28:02 +0100 |
commit | d807ec71e2451e50ac5c392ac6f38b0a56e146ea (patch) | |
tree | fd7486300d6ad19b0b537088479060879cc0dfe1 /test/tests/filter-directory-visited-tags.success | |
parent | aee7a2706dd96ee595ffc870584d737f78bab79e (diff) | |
download | incremental-git-filter-branch-d807ec71e2451e50ac5c392ac6f38b0a56e146ea.tar.gz incremental-git-filter-branch-d807ec71e2451e50ac5c392ac6f38b0a56e146ea.tar.bz2 incremental-git-filter-branch-d807ec71e2451e50ac5c392ac6f38b0a56e146ea.zip |
Fix and simplify tests
Diffstat (limited to 'test/tests/filter-directory-visited-tags.success')
-rwxr-xr-x | test/tests/filter-directory-visited-tags.success | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/test/tests/filter-directory-visited-tags.success b/test/tests/filter-directory-visited-tags.success index 527ee5a..ea788ed 100755 --- a/test/tests/filter-directory-visited-tags.success +++ b/test/tests/filter-directory-visited-tags.success @@ -1,25 +1,16 @@ #!/bin/sh -. "$(cd -- "$(dirname -- "$0")" && pwd -P)/../bootstrap.sh" +. "$(cd -- "$(dirname -- "${0}")" && pwd -P)/../bootstrap.sh" initializeRepositories -"${BIN_MAIN}" "${DIR_SOURCE}" '--prune-empty --subdirectory-filter subdir' "${DIR_DESTINATION}" +"${BIN_MAIN}" --workdir "${DIR_TEMP}" --whitelist 'master' -- "${DIR_SOURCE}" '--prune-empty --subdirectory-filter subdir' "${DIR_DESTINATION}" echo 'Fetching tags' -tags=$(getTagList "${DIR_DESTINATION}") -if itemInList 'tag-01' "${tags}" +actualTags="$(getTagList "${DIR_DESTINATION}")" +expectedTags='tag-02' +if test "${actualTags}" != "${expectedTags}" 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 + printf 'Expected tags: %s\nResulting tags: %s\n' "${expectedTags}" "${actualTags}">&2 exit 1 fi |