]> git.eshelyaron.com Git - emacs.git/commitdiff
2020-03-29 Michael R. Mauger <michael@mauger.com>
authorMichael R. Mauger <michael@mauger.com>
Mon, 30 Mar 2020 00:52:10 +0000 (20:52 -0400)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 1 Oct 2020 18:34:55 +0000 (20:34 +0200)
       * lisp/progmodes/sql.el (sql-add-product): Re-correct argument
       spec.  Previous change was due to my mistake; I have
       resolved back to the prior behavior (Bug#39960).
       * test/lisp/progmodes/sql-tests.el (sql-test-add-product): Added
       test to insure I don't make the same mistake again.

lisp/progmodes/sql.el
test/lisp/progmodes/sql-tests.el

index 400e304ecf42458e39d9263f6e0ac2eb4a3acbf1..a04c26d2764ac6a6f0ebe27dcf003d85f7e16100 100644 (file)
@@ -2740,7 +2740,7 @@ highlighting rules in SQL mode.")
              nil 'require-match
              init 'sql-product-history init))))
 
-(defun sql-add-product (product display &optional plist)
+(defun sql-add-product (product display &rest plist)
   "Add support for a database product in `sql-mode'.
 
 Add PRODUCT to `sql-product-alist' which enables `sql-mode' to
index 65ed76bfb5dc6c22e6f72ce4e300ca70f7230639..91805ab725157e64035c6a9ccf133c67c8490119 100644 (file)
@@ -187,7 +187,13 @@ Perform ACTION and validate results"
       (sql-add-product 'xyz "XyzDb")
 
       (should (equal (pp-to-string (assoc 'xyz sql-product-alist))
-                     "(xyz :name \"XyzDb\")\n"))))
+                     "(xyz :name \"XyzDb\")\n")))
+
+  (sql-test-product-feature-harness
+      (sql-add-product 'stu "StuDb" :X 1 :Y "2")
+
+      (should (equal (pp-to-string (assoc 'stu sql-product-alist))
+                     "(stu :name \"StuDb\" :X 1 :Y \"2\")\n"))))
 
 (ert-deftest sql-test-add-existing-product ()
   "Add a product that already exists."