emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/graphql df200ddcf5 25/56: New test to ensure we're on t


From: ELPA Syncer
Subject: [elpa] externals/graphql df200ddcf5 25/56: New test to ensure we're on the correct tag
Date: Sat, 29 Oct 2022 13:57:54 -0400 (EDT)

branch: externals/graphql
commit df200ddcf53b72b2092fc9c2038c55923955d43a
Author: Sean Allred <code@seanallred.com>
Commit: Sean Allred <code@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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]