@@ -902,6 +902,42 @@ it_can_check_a_repo_having_multiple_root_commits() {
902902 "
903903}
904904
905+ it_checks_with_version_depth () {
906+ local repo=$( init_repo)
907+ local ref1=$( make_commit_to_future $repo )
908+ local ref2=$( make_commit $repo )
909+ local ref3=$( make_commit $repo )
910+ check_uri_with_version_depth $repo 2 | jq -e "
911+ . == [
912+ {ref: $( echo $ref2 | jq -R .) },
913+ {ref: $( echo $ref3 | jq -R .) }
914+ ]
915+ "
916+ }
917+
918+ it_checks_uri_with_tag_filter_and_version_depth () {
919+ local repo=$( init_repo)
920+ local ref1=$( make_commit $repo )
921+ make_annotated_tag $repo " test.tag.1" " tag ref1"
922+ local ref2=$( make_commit $repo )
923+ make_annotated_tag $repo " test.tag.2" " tag ref2"
924+ local ref3=$( make_commit $repo )
925+ make_annotated_tag $repo " test.badtag.3" " tag ref3"
926+ local ref4=$( make_commit $repo )
927+ make_annotated_tag $repo " test.tag.4" " tag ref4"
928+ check_uri_with_tag_filter_and_version_depth $repo 2 " test.tag.*" | jq -e "
929+ . == [
930+ {
931+ ref: \" test.tag.2\" ,
932+ commit: $( echo $ref2 | jq -R .)
933+ },
934+ {
935+ ref: \" test.tag.4\" ,
936+ commit: $( echo $ref4 | jq -R .)
937+ }
938+ ]"
939+ }
940+
905941run it_can_check_from_head
906942run it_can_check_from_a_ref
907943run it_can_check_from_a_first_commit_in_repo
@@ -947,3 +983,6 @@ run it_can_check_with_tag_filter_given_branch_first_ref
947983run it_can_check_with_tag_regex_given_branch_first_ref
948984run it_checks_lastest_commit
949985run it_can_check_a_repo_having_multiple_root_commits
986+ run it_checks_with_version_depth
987+ run it_checks_uri_with_tag_filter_and_version_depth
988+
0 commit comments