From 94daf1ef3078f2f84fb0541433f6451bf0431cc0 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 10 Dec 2023 16:24:38 -0500 Subject: tests: Update branch name expectation for git-annex change git-annex 10.20230214 started including the parent branch name in the names of view branches. Given annexview's current "hibernating prototype" status, don't bother making this assertion work with older git-annex versions. --- annexview-tests.el | 54 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/annexview-tests.el b/annexview-tests.el index b4ad4e6..3770a4c 100644 --- a/annexview-tests.el +++ b/annexview-tests.el @@ -169,29 +169,31 @@ (ert-deftest annexview-views () (annexview-with-test-repo - (annexview-create-view (list "year=*")) - (should (file-exists-p "2017")) - (should (file-exists-p "2018")) - ;; vpop - (annexview-vpop) - (should-not (file-exists-p "2017")) - (should-not (file-exists-p "2018")) - ;; vcycle - (annexview-create-view (list "tag=*" "year=*")) - (should (equal (annexview-string-sort (annexview-views)) - (list "tag=_;year=_" "year=_"))) - (should (file-exists-p "foo-tag0")) - (should (file-exists-p "foo-tag1")) - (annexview-vcycle) - (should (file-exists-p "2017")) - (should (file-exists-p "2017/foo-tag0")) - ;; vfilter - (annexview-create-view (list "year=*")) - (annexview-vfilter (list "tag=foo-tag0")) - (should (file-exists-p "2017")) - (should-not (file-exists-p "2018")) - ;; vadd - (annexview-create-view (list "tag=*")) - (annexview-vadd (list "year=*")) - (should (file-exists-p "2017")) - (should (file-exists-p "2017/foo-tag0")))) + (let ((base (annexview-git-string "symbolic-ref" "--short" "HEAD"))) + (annexview-create-view (list "year=*")) + (should (file-exists-p "2017")) + (should (file-exists-p "2018")) + ;; vpop + (annexview-vpop) + (should-not (file-exists-p "2017")) + (should-not (file-exists-p "2018")) + ;; vcycle + (annexview-create-view (list "tag=*" "year=*")) + (should (equal (annexview-string-sort (annexview-views)) + (mapcar (lambda (v) (concat base "(" v ")")) + (list "tag=_;year=_" "year=_")))) + (should (file-exists-p "foo-tag0")) + (should (file-exists-p "foo-tag1")) + (annexview-vcycle) + (should (file-exists-p "2017")) + (should (file-exists-p "2017/foo-tag0")) + ;; vfilter + (annexview-create-view (list "year=*")) + (annexview-vfilter (list "tag=foo-tag0")) + (should (file-exists-p "2017")) + (should-not (file-exists-p "2018")) + ;; vadd + (annexview-create-view (list "tag=*")) + (annexview-vadd (list "year=*")) + (should (file-exists-p "2017")) + (should (file-exists-p "2017/foo-tag0"))))) -- cgit v1.2.3