emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 75c663f: Use 'defalias' in test module instead of '


From: Philipp Stephani
Subject: [Emacs-diffs] master 75c663f: Use 'defalias' in test module instead of 'fset'.
Date: Fri, 2 Feb 2018 14:41:31 -0500 (EST)

branch: master
commit 75c663f834528c5431973bf8dc6386c327f9fe0f
Author: Philipp Stephani <address@hidden>
Commit: Philipp Stephani <address@hidden>

    Use 'defalias' in test module instead of 'fset'.
    
    This puts functions defined in the module into the 'load-history'.
    
    * test/data/emacs-module/mod-test.c (bind_function): Use 'defalias'
    instead of 'fset'.
    
    * test/src/emacs-module-tests.el (module/describe-function-1): Adapt
    unit test.
---
 test/data/emacs-module/mod-test.c | 4 ++--
 test/src/emacs-module-tests.el    | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/test/data/emacs-module/mod-test.c 
b/test/data/emacs-module/mod-test.c
index a1c115f..db05e90 100644
--- a/test/data/emacs-module/mod-test.c
+++ b/test/data/emacs-module/mod-test.c
@@ -299,11 +299,11 @@ provide (emacs_env *env, const char *feature)
 static void
 bind_function (emacs_env *env, const char *name, emacs_value Sfun)
 {
-  emacs_value Qfset = env->intern (env, "fset");
+  emacs_value Qdefalias = env->intern (env, "defalias");
   emacs_value Qsym = env->intern (env, name);
   emacs_value args[] = { Qsym, Sfun };
 
-  env->funcall (env, Qfset, 2, args);
+  env->funcall (env, Qdefalias, 2, args);
 }
 
 /* Module init function.  */
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index 05be838..052f5c2 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -268,8 +268,9 @@ during garbage collection."
     (let ((standard-output (current-buffer)))
       (describe-function-1 #'mod-test-sum)
       (should (equal (buffer-substring-no-properties 1 (point-max))
-                     ;; FIXME: This should print the filename.
-                     "a module function.
+                     ;; FIXME: This should print the actual module
+                     ;; filename.
+                     "a module function in `src/emacs-module-tests.el'.
 
 (mod-test-sum a b)
 



reply via email to

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