diff options
-rw-r--r-- | org-fc-awk.el | 2 | ||||
-rw-r--r-- | tests/escaping/spaces in filename.org | 12 | ||||
-rw-r--r-- | tests/org-fc-indexer-test.el | 8 |
3 files changed, 21 insertions, 1 deletions
diff --git a/org-fc-awk.el b/org-fc-awk.el index 9c9d89b..fce1747 100644 --- a/org-fc-awk.el +++ b/org-fc-awk.el @@ -31,7 +31,7 @@ a '.' to exclude temporary / backup files. With the '-L' option, 'find' follows symlinks." (format "find -L %s -name \"*.org\" -not -name \".*\" -print0" - (mapconcat 'identity paths " "))) + (mapconcat 'shell-quote-argument paths " "))) (defun org-fc-awk--indexer-variables () "Variables to pass to indexer scripts." diff --git a/tests/escaping/spaces in filename.org b/tests/escaping/spaces in filename.org new file mode 100644 index 0000000..ec3fd2a --- /dev/null +++ b/tests/escaping/spaces in filename.org @@ -0,0 +1,12 @@ +* Test Front :fc: +:PROPERTIES: +:FC_CREATED: 2020-11-02T13:07:39Z +:FC_TYPE: normal +:ID: 33645f3a-384d-44ed-aed2-a2d56b973800 +:END: +:REVIEW_DATA: +| position | ease | box | interval | due | +|----------+------+-----+----------+----------------------| +| front | 2.5 | 0 | 0 | 2020-11-02T13:07:39Z | +:END: +Test Back diff --git a/tests/org-fc-indexer-test.el b/tests/org-fc-indexer-test.el index 1d37529..adb00fe 100644 --- a/tests/org-fc-indexer-test.el +++ b/tests/org-fc-indexer-test.el @@ -14,6 +14,14 @@ (should (null (org-fc-awk-index-paths (list (org-fc-test-fixture "malformed/unclosed_drawer2.org")))))) +(ert-deftest org-fc-test-escaping () + (let ((index (org-fc-awk-index-paths + (list (org-fc-test-fixture "escaping/spaces in filename.org"))))) + (should (eq (length index) 1)) + (should + (equal (plist-get (car index) :id) + "33645f3a-384d-44ed-aed2-a2d56b973800")))) + (ert-deftest org-fc-test-index () (let ((index (org-fc-awk-index-paths (list |