diff options
| author | Eli Zaretskii | 2018-11-10 11:16:17 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2018-11-10 11:16:17 +0200 |
| commit | d6b7b60cd0b4af8c0760589e132593b5c716d8ce (patch) | |
| tree | 140b22b62d9456423ba283aaa2ce827b4d3a26b2 /test/src | |
| parent | ffb4c76d99ba9d4f5a0d876c23b2837d31291141 (diff) | |
| download | emacs-d6b7b60cd0b4af8c0760589e132593b5c716d8ce.tar.gz emacs-d6b7b60cd0b4af8c0760589e132593b5c716d8ce.zip | |
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/src')
| -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 @@ | |||
| 351 | (should (equal (format "%-#50.40x" v3) | 351 | (should (equal (format "%-#50.40x" v3) |
| 352 | "-0x000000003ffffffffffffffe000000000000000 ")))) | 352 | "-0x000000003ffffffffffffffe000000000000000 ")))) |
| 353 | 353 | ||
| 354 | (ert-deftest group-name () | 354 | (ert-deftest test-group-name () |
| 355 | (let ((list `((0 . "root") | 355 | (cond |
| 356 | (1000 . ,(user-login-name 1000)) | 356 | ((memq system-type '(windows-nt ms-dos)) |
| 357 | (1212345 . nil)))) | 357 | (should (stringp (group-name (group-gid)))) |
| 358 | (dolist (test list) | 358 | (should-not (group-name 123456789)) |
| 359 | (should (equal (group-name (car test)) (cdr test)))))) | 359 | (should-error (group-name 'foo))) |
| 360 | (t | ||
| 361 | (let ((list `((0 . "root") | ||
| 362 | (1000 . ,(user-login-name 1000)) | ||
| 363 | (1212345 . nil)))) | ||
| 364 | (dolist (test list) | ||
| 365 | (should (equal (group-name (car test)) (cdr test))))) | ||
| 366 | (should-error (group-name 'foo))))) | ||
| 360 | 367 | ||
| 361 | ;;; editfns-tests.el ends here | 368 | ;;; editfns-tests.el ends here |