about summary refs log tree commit diff
path: root/users/wpcarro/emacs/pkgs/string/tests.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2022-07-30T01·56-0700
committerclbot <clbot@tvl.fyi>2022-07-30T02·01+0000
commit8989dad5ed88d55e24d5f3047597053232068c11 (patch)
treee1d6115958321dabef838dd869611981071ffc85 /users/wpcarro/emacs/pkgs/string/tests.el
parent7410928b5bddc12b488b102315260129565ed7ef (diff)
feat(wpcarro/emacs): Package string.el r/4347
Mostly just a wrapper around s.el (for now?). Eventually I'd like to prune the
dependency on dash.el (and maybe s.el).

Change-Id: I5c2ba256524bedd93fcd13933fdbd95b1ddff6f8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6002
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Tested-by: BuildkiteCI
Diffstat (limited to '')
-rw-r--r--users/wpcarro/emacs/pkgs/string/tests.el22
1 files changed, 22 insertions, 0 deletions
diff --git a/users/wpcarro/emacs/pkgs/string/tests.el b/users/wpcarro/emacs/pkgs/string/tests.el
new file mode 100644
index 000000000000..92290c6db803
--- /dev/null
+++ b/users/wpcarro/emacs/pkgs/string/tests.el
@@ -0,0 +1,22 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Dependencies
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(require 'ert)
+(require 'string)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Tests
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(ert-deftest string-caps->kebab ()
+  (string= "foo-bar-baz" (string-caps->kebab "FOO_BAR_BAZ")))
+
+(ert-deftest string-kebab->caps ()
+  (string= "FOO_BAR_BAZ" (string-kebab->caps "foo-bar-baz")))
+
+(ert-deftest string-lower->caps ()
+  (string= "FOO_BAR_BAZ" (string-lower->caps "foo bar baz")))
+
+(ert-deftest string-lower->kebab ()
+  (string= "foo-bar-baz" (string-lower->kebab "foo bar baz")))