summaryrefslogtreecommitdiff
path: root/kv-tests.el
diff options
context:
space:
mode:
authorAndrew Kirkpatrick <ubermonk@gmail.com>2012-12-31 14:40:57 +1030
committerAndrew Kirkpatrick <ubermonk@gmail.com>2012-12-31 14:40:57 +1030
commit83df0dd7a0c6ff9e982c1601b65b83647872bf29 (patch)
treefe3bc5b15db177d295c17d38bf27090cd72b0f4d /kv-tests.el
parent8c11a41ed594e708be453bfca659e314f6a5babc (diff)
made keyword->symbol tolerant of non-keyword symbols
added test for keyword->symbol
Diffstat (limited to 'kv-tests.el')
-rw-r--r--kv-tests.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/kv-tests.el b/kv-tests.el
index 7b83ebb..4a4823f 100644
--- a/kv-tests.el
+++ b/kv-tests.el
@@ -141,6 +141,22 @@
(dotassq 'a.b.c '((a . ((b . ((c . 10)))))))
10)))
+(ert-deftest keyword->symbol ()
+ "Convert keyword into a symbol without the leading `:'"
+ (should
+ (eq
+ 'key
+ (keyword->symbol :key)))
+ (should
+ (eq
+ 'key
+ (keyword->symbol 'key)))
+ (let ((sym (gensym)))
+ (should
+ (eq
+ sym
+ (keyword->symbol sym)))))
+
(ert-deftest kvalist->plist ()
"Make alists into plists."
(should