aboutsummaryrefslogtreecommitdiff
path: root/test/test-util.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2015-01-02 18:13:26 -0500
committerSean Allred <code@seanallred.com>2015-01-02 18:13:26 -0500
commit2797cd52800b628c91de9c191f24f5513fe244ca (patch)
tree16125090a71812cab759eaa0bba9bde55c4b566a /test/test-util.el
parentf97c84c2d4a0a8ef6e53333a0a5c528397ccaded (diff)
parentdd9c2017cb3f0b145b39150562a0c4e59c244df1 (diff)
Merge branch 'get-all' into tag-bot
Diffstat (limited to 'test/test-util.el')
-rw-r--r--test/test-util.el31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/test-util.el b/test/test-util.el
new file mode 100644
index 0000000..5db1691
--- /dev/null
+++ b/test/test-util.el
@@ -0,0 +1,31 @@
+(ert-deftest thing-as-string ()
+ "Test `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")))