|
3 | 3 | ;; Author: Mats Lidell <[email protected]>
|
4 | 4 | ;;
|
5 | 5 | ;; Orig-Date: 19-Jun-21 at 22:42:00
|
6 |
| -;; Last-Mod: 17-Nov-23 at 10:48:26 by Bob Weiner |
| 6 | +;; Last-Mod: 25-Nov-23 at 00:16:26 by Mats Lidell |
7 | 7 | ;;
|
8 | 8 | ;; SPDX-License-Identifier: GPL-3.0-or-later
|
9 | 9 | ;;
|
@@ -270,5 +270,24 @@ and {b} the previous same level cell."
|
270 | 270 | (should (string= (buffer-string) sorted-hyrolo-file)))
|
271 | 271 | (hy-delete-file-and-buffer hyrolo-file))))
|
272 | 272 |
|
| 273 | +(ert-deftest hyrolo-fgrep-find-all-types-of-files () |
| 274 | + "Verify that all types of files are found in an fgrep search." |
| 275 | + (let* ((temporary-file-directory (make-temp-file "hypb" t)) |
| 276 | + (org-file (make-temp-file "hypb" nil ".org" "string\n")) |
| 277 | + (kotl-file (make-temp-file "hypb" nil ".kotl" "string")) |
| 278 | + (md-file (make-temp-file "hypb" nil ".md" "string\n")) |
| 279 | + (outl-file (make-temp-file "hypb" nil ".otl" "string\n")) |
| 280 | + (hyrolo-file-list (list temporary-file-directory))) |
| 281 | + (unwind-protect |
| 282 | + (progn |
| 283 | + (hyrolo-fgrep "string") |
| 284 | + (with-current-buffer "*HyRolo*" |
| 285 | + (should (= (how-many "@loc>") 4)) |
| 286 | + (dolist (f (list org-file kotl-file md-file outl-file)) |
| 287 | + (should (= (how-many (concat "@loc> \"" f "\"")) 1))))) |
| 288 | + (dolist (f (list org-file kotl-file md-file outl-file)) |
| 289 | + (hy-delete-file-and-buffer f)) |
| 290 | + (delete-directory temporary-file-directory)))) |
| 291 | + |
273 | 292 | (provide 'hyrolo-tests)
|
274 | 293 | ;;; hyrolo-tests.el ends here
|
0 commit comments