branch: externals/dired-preview commit 22150aa122f3fe0a5855c5d232bb2a625e8996ca Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Make stylistic changes to dired-preview-test.el and move it intot a subdirectory This extends what Sean Devlin contributed in pull request 26: <https://github.com/protesilaos/dired-preview/pull/26>. The change is within the ~15-line limit, meaning that Sean does not need to assign copyright to the Free Software Foundation. --- .../dired-preview-test.el | 35 ++++++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/dired-preview-test.el b/tests/dired-preview-test.el similarity index 55% rename from dired-preview-test.el rename to tests/dired-preview-test.el index 12e537dec6..5fdb13b3ca 100644 --- a/dired-preview-test.el +++ b/tests/dired-preview-test.el @@ -1,15 +1,40 @@ ;;; dired-preview-test.el --- Unit tests for Dired preview -*- lexical-binding: t -*- +;; Copyright (C) 2023-2025 Free Software Foundation, Inc. + +;; Author: Protesilaos Stavrou <i...@protesilaos.com> +;; Maintainer: Protesilaos Stavrou <i...@protesilaos.com> +;; URL: https://github.com/protesilaos/denote + +;; This file is NOT part of GNU Emacs. + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <https://www.gnu.org/licenses/>. + ;;; Commentary: -;; Tests for Dired preview. +;; Tests for Dired preview. Note that we are using Shorthands in this +;; file, so the "dpt-" prefix really is "denote-preview-test-". +;; Evaluate the following to learn more: +;; +;; (info "(elisp) Shorthands") ;;; Code: (require 'ert) (require 'dired-preview) -(ert-deftest dired-preview-test--dired-preview--file-ignored-p () +(ert-deftest dpt--dired-preview--file-ignored-p () "Test that `dired-preview--file-ignored-p' returns non-nil for ignored file names." (let ((dired-preview-ignored-extensions-regexp (custom--standard-value 'dired-preview-ignored-extensions-regexp))) @@ -20,7 +45,7 @@ (let ((dired-preview-ignored-extensions-regexp "\\.DS_Store\\'")) (should (dired-preview--file-ignored-p ".DS_Store")))) -(ert-deftest dired-preview-test--dired-preview--infer-type () +(ert-deftest dpt--dired-preview--infer-type () "Test that `dired-preview--infer-type' infers the correct file type." (let ((dired-preview-ignored-extensions-regexp (custom--standard-value 'dired-preview-ignored-extensions-regexp))) @@ -38,3 +63,7 @@ (provide 'dired-preview-test) ;;; dired-preview-test.el ends here + +;; Local Variables: +;; read-symbol-shorthands: (("dpt" . "dired-preview-test-")) +;; End: