aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2023-12-10 16:24:38 -0500
committerKyle Meyer <kyle@kyleam.com>2023-12-10 16:29:27 -0500
commit94daf1ef3078f2f84fb0541433f6451bf0431cc0 (patch)
tree0412f572e303f697194a0037beb5135f9e4a4b0c
parentb2ca0aebb523e667e29ec45ea6ebb015f483bcf9 (diff)
downloadannexview-master.tar.gz
tests: Update branch name expectation for git-annex changeHEADmaster
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.
-rw-r--r--annexview-tests.el54
1 files 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")))))