[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/triples 7d5aca3bb8 02/19: Fix issue where single elemen
From: |
ELPA Syncer |
Subject: |
[elpa] externals/triples 7d5aca3bb8 02/19: Fix issue where single element lists were not being treated as lists. |
Date: |
Sat, 5 Nov 2022 11:58:16 -0400 (EDT) |
branch: externals/triples
commit 7d5aca3bb862c364420a6e4d32805b4e96085408
Author: Andrew Hyatt <ahyatt@gmail.com>
Commit: Andrew Hyatt <ahyatt@gmail.com>
Fix issue where single element lists were not being treated as lists.
---
triples-test.el | 7 +++++++
triples.el | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/triples-test.el b/triples-test.el
index 9689a9e65e..f539727cd8 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -117,6 +117,13 @@ easily debug into it.")
(triples-delete-subject db "foo")
(should-not (triples-get-subject db "foo"))))
+(ert-deftest triples-single-element ()
+ (triples-test-with-temp-db
+ (triples-add-schema db 'named 'name)
+ (triples-set-type db "foo" 'named :name '("Name"))
+ (should (equal '(:name ("Name"))
+ (triples-get-type db "foo" 'named)))))
+
(ert-deftest triples-reversed ()
(triples-test-with-temp-db
(triples-add-schema db 'named
diff --git a/triples.el b/triples.el
index e8c95dd75e..66d2c994b7 100644
--- a/triples.el
+++ b/triples.el
@@ -194,7 +194,7 @@ PROPERTIES is a plist of properties, without TYPE prefixes."
(append
(cl-loop for k being the hash-keys of preds using (hash-values v)
nconc (list (triples--encolon (cdr
(triples--combined-to-type-and-prop k)))
- (if (and (cdr v)
+ (if (and (car v)
(plist-get (cdar v) :index))
(mapcar #'car (sort v (lambda (a b)
(< (plist-get (cdr a)
:index)
- [elpa] branch externals/triples created (now d17b3d6e17), ELPA Syncer, 2022/11/05
- [elpa] externals/triples 7d5aca3bb8 02/19: Fix issue where single element lists were not being treated as lists.,
ELPA Syncer <=
- [elpa] externals/triples 6f8f3376f1 06/19: Add `triples-set-types'., ELPA Syncer, 2022/11/05
- [elpa] externals/triples 5e8abd2989 01/19: Initial commit of triples module., ELPA Syncer, 2022/11/05
- [elpa] externals/triples cc5629fe5c 07/19: Wrap all database access in `triples-set-types' in a transaction., ELPA Syncer, 2022/11/05
- [elpa] externals/triples 257de87fdc 08/19: Minor code cleanup., ELPA Syncer, 2022/11/05
- [elpa] externals/triples 4627d6ed6d 10/19: Fix minor mistakes in ert tests., ELPA Syncer, 2022/11/05
- [elpa] externals/triples fb63dfe44a 12/19: Convert to sqlite., ELPA Syncer, 2022/11/05
- [elpa] externals/triples 0252dad7d1 17/19: Fixes from code review from Stefan Monnier., ELPA Syncer, 2022/11/05
- [elpa] externals/triples d17b3d6e17 19/19: Merge branch 'combined'., ELPA Syncer, 2022/11/05
- [elpa] externals/triples 2dae3d49b9 18/19: Various fixes for emacsql code, which wasn't being tested correctly., ELPA Syncer, 2022/11/05
- [elpa] externals/triples 6afcb290ca 15/19: Support both emacs 29 sqlite and emacsql., ELPA Syncer, 2022/11/05