diff options
author | Eli Zaretskii <eliz@gnu.org> | 2018-11-10 11:16:17 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2018-11-10 11:16:17 +0200 |
commit | d6b7b60cd0b4af8c0760589e132593b5c716d8ce (patch) | |
tree | 140b22b62d9456423ba283aaa2ce827b4d3a26b2 /test | |
parent | ffb4c76d99ba9d4f5a0d876c23b2837d31291141 (diff) | |
download | emacs-d6b7b60cd0b4af8c0760589e132593b5c716d8ce.tar.gz |
Fix last change
* src/editfns.c (Fgroup_name): Fix the doc string. Move
closer to the "group" functions.
* src/w32.c (getgrgid): Return NULL if GID is not the group ID
of the user of this Emacs session
* test/src/editfns-tests.el (test-group-name): Rename from
'group-name'. Add tests for non-Posix hosts. Test error when
the argument to group-name is invalid.
* etc/NEWS: Fix wording of last added entry.
Diffstat (limited to 'test')
-rw-r--r-- | test/src/editfns-tests.el | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el index 6ee0ab09f7b..7b6c990f350 100644 --- a/test/src/editfns-tests.el +++ b/test/src/editfns-tests.el @@ -351,11 +351,18 @@ (should (equal (format "%-#50.40x" v3) "-0x000000003ffffffffffffffe000000000000000 ")))) -(ert-deftest group-name () - (let ((list `((0 . "root") - (1000 . ,(user-login-name 1000)) - (1212345 . nil)))) - (dolist (test list) - (should (equal (group-name (car test)) (cdr test)))))) +(ert-deftest test-group-name () + (cond + ((memq system-type '(windows-nt ms-dos)) + (should (stringp (group-name (group-gid)))) + (should-not (group-name 123456789)) + (should-error (group-name 'foo))) + (t + (let ((list `((0 . "root") + (1000 . ,(user-login-name 1000)) + (1212345 . nil)))) + (dolist (test list) + (should (equal (group-name (car test)) (cdr test))))) + (should-error (group-name 'foo))))) ;;; editfns-tests.el ends here |