emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/hyperbole aa6f2f6 38/50: Verify error message from hpat


From: Stefan Monnier
Subject: [elpa] externals/hyperbole aa6f2f6 38/50: Verify error message from hpath:find is correct (#50)
Date: Wed, 17 Mar 2021 18:44:21 -0400 (EDT)

branch: externals/hyperbole
commit aa6f2f685e4d9f4ab844e8ad28f63979c19ef7c3
Author: Mats Lidell <mats.lidell@lidells.se>
Commit: GitHub <noreply@github.com>

    Verify error message from hpath:find is correct (#50)
---
 Changes             |  4 ++++
 test/hpath-tests.el | 29 +++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+)

diff --git a/Changes b/Changes
index f103344..94d489e 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
 2021-02-28  Mats Lidell  <matsl@gnu.org>
 
+* test/hpath-tests.el
+    (hpath:find-report-lisp-variable-path-name-when-not-exists): Verify
+    not found file name error message contains the expanded lisp variable. 
+
 * hbut.el (defil): Use FIXEDCASE is non-nil to not alter the case of the
     replacement text.
  
diff --git a/test/hpath-tests.el b/test/hpath-tests.el
new file mode 100644
index 0000000..525433c
--- /dev/null
+++ b/test/hpath-tests.el
@@ -0,0 +1,29 @@
+;;; hpath-tests.el --- unit tests for hpath         -*- lexical-binding: t; -*-
+
+;; Author: Mats Lidell <matsl@gnu.org>
+;;
+;; Orig-Date: 28-Feb-21 at 23:26:00
+;;
+;; Copyright (C) 2021  Free Software Foundation, Inc.
+;; See the "HY-COPY" file for license information.
+;;
+;; This file is part of GNU Hyperbole.
+
+;;; Commentary:
+
+;; Unit tests for "../hpath.el"
+
+;;; Code:
+
+(require 'ert)
+(require 'hpath)
+
+(ert-deftest hpath:find-report-lisp-variable-path-name-when-not-exists ()
+  "hpath:find prints out the wrong filename on lisp variable expanded 
filenames"
+  :expected-result :failed
+  (condition-case err
+      (hpath:find "${hyperb:dir}/UNKNOWNFILE")
+    (error (should (string-search (concat hyperb:dir "UNKNOWNFILE") (cadr 
err))))))
+
+(provide 'hpath-tests)
+;;; hpath-tests.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]