Skip to content

Commit

Permalink
Merge pull request #30 from tychobrailleur/fix/s-drop-fix
Browse files Browse the repository at this point in the history
Fix void function for s-drop
  • Loading branch information
ag91 authored Mar 23, 2024
2 parents c01772a + 582b5a0 commit 41c3ee6
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 41c3ee6

Please sign in to comment.