feat(wpcarro/emacs): Package string.el
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
This commit is contained in:
parent
7410928b5b
commit
8989dad5ed
4 changed files with 57 additions and 19 deletions
22
users/wpcarro/emacs/pkgs/string/tests.el
Normal file
22
users/wpcarro/emacs/pkgs/string/tests.el
Normal file
|
|
@ -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")))
|
||||
Loading…
Add table
Add a link
Reference in a new issue