aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2014-12-09 15:10:26 +0000
committerArtur Malabarba <bruce.connor.am@gmail.com>2014-12-09 15:10:26 +0000
commitdb82dc546b528eef2487820381884c7c67e3683a (patch)
tree00fc5da4031932315956e79952aa4cce2e68e6db /test
parent2651764450b76bd6573cfea2b98f54beeae4f0f1 (diff)
parenta983476a59701f1cc01580b16fc5235360054adf (diff)
Merge branch 'master' into fix-@highligthing
Conflicts: test/tests.el
Diffstat (limited to 'test')
-rw-r--r--test/tests.el36
1 files changed, 34 insertions, 2 deletions
diff --git a/test/tests.el b/test/tests.el
index 56a5501..b997c6e 100644
--- a/test/tests.el
+++ b/test/tests.el
@@ -137,10 +137,42 @@
(ert-deftest sx--user-@name ()
"Tests macro expansion for `sx-assoc-let'"
(should
- (string=
+ (string=
(sx--user-@name '((display_name . "ĥÞßđłřğĝýÿñńśşšŝżźžçćčĉùúûüŭůòóôõöøőðìíîïıèéêëęàåáâäãåąĵ★")))
"@hTHssdlrggyynnsssszzzccccuuuuuuooooooooiiiiieeeeeaaaaaaaaj"))
(should
- (string=
+ (string=
(sx--user-@name '((display_name . "ĤÞßĐŁŘĞĜÝŸÑŃŚŞŠŜŻŹŽÇĆČĈÙÚÛÜŬŮÒÓÔÕÖØŐÐÌÍÎÏıÈÉÊËĘÀÅÁÂÄÃÅĄĴ")))
"@HTHssDLRGGYYNNSSSSZZZCCCCUUUUUUOOOOOOOOIIIIiEEEEEAAAAAAAAJ")))
+
+(ert-deftest thing-as-string ()
+ "Tests `sx--thing-as-string'"
+ (should
+ (string= (sx--thing-as-string
+ '(hello world (this is a test))
+ '(";" "+"))
+ "hello;world;this+is+a+test"))
+ (should
+ (string= (sx--thing-as-string
+ '(this is a test) '(";" "+"))
+ "this;is;a;test"))
+ (should
+ (string= (sx--thing-as-string
+ '(this is a test) "+")
+ "this+is+a+test"))
+ (should
+ (string= (sx--thing-as-string
+ '(this is a test))
+ "this;is;a;test"))
+ (should
+ (string= (sx--thing-as-string
+ 'test)
+ "test"))
+ (should
+ (string= (sx--thing-as-string
+ 'test&)
+ "test&"))
+ (should
+ (string= (sx--thing-as-string
+ 'test& nil t)
+ "test%26")))