Skip to content

Commit

Permalink
Fix void function for s-drop
Browse files Browse the repository at this point in the history
  • Loading branch information
tychobrailleur committed Mar 23, 2024
1 parent c01772a commit 582b5a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion moldable-emacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -2138,7 +2138,7 @@ Optionally provide DEPTH to define the number of additions asterisks to prepend
(let ((keys (me-keys (car plist))))
(concat
;; header
(s-join "," (--map (s-drop 1 (symbol-name it)) keys))
(s-join "," (--map (s-chop-left 1 (symbol-name it)) keys))
;; entries
"\n"
(--> plist
Expand Down
7 changes: 7 additions & 0 deletions tests/moldable-emacs-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,10 @@ some new contents
(list :example (plist-get it :name) :success t :issues nil)
(plist-get mold :examples)))
molds-with-examples)))))

(ert-deftest me-plist-to-csv-string_returns-csv ()
(should
(string= (me-plist-to-csv-string '((:a "1" :b "2") (:a "3" :b "4")))
"a,b
1,2
3,4")))

0 comments on commit 582b5a0

Please sign in to comment.