aboutsummaryrefslogtreecommitdiff
path: root/test/test-util.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2015-01-02 12:47:03 -0500
committerSean Allred <code@seanallred.com>2015-01-02 12:47:03 -0500
commitcf97f4c691ff5a2ee001e1f22e2eed0d7f6a9df8 (patch)
tree2f521c8f35a9a65f9da02eab4ff83257aa0a0260 /test/test-util.el
parent542ddf73506c2c297106e4b3f4ec0a1d80a35ad8 (diff)
parent9a420bffcc426b4826f14ad1f62b5430750821df (diff)
Merge branch 'master' into goto-map
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")))