branch: externals/graphql commit df200ddcf53b72b2092fc9c2038c55923955d43a Author: Sean Allred <c...@seanallred.com> Commit: Sean Allred <c...@seanallred.com>
New test to ensure we're on the correct tag I've had this problem in the past. --- test/graphql-test.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/graphql-test.el b/test/graphql-test.el index b18283727a..f80bba968a 100644 --- a/test/graphql-test.el +++ b/test/graphql-test.el @@ -1,6 +1,22 @@ ;;; graphql-test.el --- Tests for graphql.el (require 'graphql) +(require 'package) + +(ert-deftest correct-tag () + (should + (let* ((root "graphql.el") + (root (thread-last root + (locate-dominating-file default-directory) + (expand-file-name root)))) + (version-list-= + (package-desc-version + (with-temp-buffer + (insert-file-contents-literally root) + (package-buffer-info))) + (with-temp-buffer + (when (= 0 (call-process "git" nil t nil "describe" "--tags")) + (version-to-list (car (split-string (buffer-string) "-"))))))))) (ert-deftest encode-basic () (should (string= (graphql-encode