aboutsummaryrefslogtreecommitdiff
path: root/test/test-util.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2015-01-16 09:28:29 -0500
committerSean Allred <code@seanallred.com>2015-01-16 09:28:29 -0500
commit8fb868bef68337bf2b5539fbc3be2ceb42a4825a (patch)
tree1eaeea3e78200995ad746251a83624b81a99ec35 /test/test-util.el
parent389e433953bba4003b102748dbbf5f8a9b421a51 (diff)
parent402bac079cd32d1260ea839667db639f94f4254e (diff)
Merge pull request #231 from vermiculus/malabarba/fix-display-from-inbox
Fix sx-display from inbox. Now RET should work on any inbox item. Much more usable!
Diffstat (limited to 'test/test-util.el')
-rw-r--r--test/test-util.el26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/test-util.el b/test/test-util.el
index 1e3dc2b..b466c08 100644
--- a/test/test-util.el
+++ b/test/test-util.el
@@ -43,3 +43,29 @@
(lambda (path) (intern (mapconcat #'symbol-name path "/")))
'(a b (c d (e f g) h i (j k) l) m (n o) p))
'(a b c/d c/e/f c/e/g c/h c/i c/j/k c/l m n/o p))))
+
+(ert-deftest link-to-data ()
+ (should
+ (equal
+ (sx--link-to-data "http://meta.emacs.stackexchange.com/posts/comments/510?noredirect=1")
+ '((id . 510) (type . comment) (site_par . "meta.emacs"))))
+ (should
+ (equal
+ (sx--link-to-data "http://emacs.stackexchange.com/questions/7409/is-there-a-generic-toggle-previous-window-function#comment10965_7409")
+ '((id . 10965) (type . comment) (site_par . "emacs"))))
+ (should
+ (equal
+ (sx--link-to-data "http://emacs.stackexchange.com/q/7409/50")
+ '((id . 7409) (type . question) (site_par . "emacs"))))
+ (should
+ (equal
+ (sx--link-to-data "http://emacs.stackexchange.com/a/7410/50")
+ '((id . 7410) (type . answer) (site_par . "emacs"))))
+ (should
+ (equal
+ (sx--link-to-data "http://emacs.stackexchange.com/questions/7409/is-there-a-generic-toggle-previous-window-function/9999#7410")
+ '((id . 7410) (type . answer) (site_par . "emacs"))))
+ (should
+ (equal
+ (sx--link-to-data "http://emacs.stackexchange.com/questions/7409/is-there-a-generic-toggle-previous-window-function/7410")
+ '((id . 7410) (type . answer) (site_par . "emacs")))))