Mercurial > hg > xemacs-beta
comparison tests/automated/dired-tests.el @ 5733:c30fdcab7bc8
Added optional argument ID-FORMAT to file-attributes for GNU compatibility.
src/ChangeLog:
2013-04-19 Mats Lidell <matsl@xemacs.org>
* sysdep.c (qxe_getgrgid): Encapsulation of getgrgid.
* syspwd.h: Ditto.
* dired.c (Ffile_attributes): Added optional ID-FORMAT for
compatibility with GNU.
author | Mats Lidell <mats.lidell@cag.se> |
---|---|
date | Sat, 20 Apr 2013 00:04:58 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
5732:02d0124c6314 | 5733:c30fdcab7bc8 |
---|---|
1 ;; Copyright (C) 2013 Free Software Foundation, Inc. | |
2 | |
3 ;; Author: Mats Lidell <matsl@xemacs.org> | |
4 ;; Maintainer: | |
5 ;; Created: 2013 | |
6 ;; Keywords: tests | |
7 | |
8 ;; This file is part of XEmacs. | |
9 | |
10 ;; XEmacs is free software: you can redistribute it and/or modify it | |
11 ;; under the terms of the GNU General Public License as published by the | |
12 ;; Free Software Foundation, either version 3 of the License, or (at your | |
13 ;; option) any later version. | |
14 | |
15 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
16 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
17 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
18 ;; for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
21 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>. | |
22 | |
23 ;;; Synched up with: Not in FSF. | |
24 | |
25 ;;; Commentary: | |
26 | |
27 ;; Test tag support. | |
28 ;; See test-harness.el for instructions on how to run these tests. | |
29 | |
30 (require 'test-harness) | |
31 | |
32 (let* ((test-file-name (make-temp-file "dired-test")) | |
33 (attr (file-attributes test-file-name))) | |
34 (Assert (equal (nth 0 attr) nil)) | |
35 (Assert (equal (nth 1 attr) 1)) | |
36 (Assert (numberp (nth 2 attr))) | |
37 (Assert (equal (nth 2 attr) (user-uid))) | |
38 (Assert (numberp (nth 3 attr))) | |
39 (Assert (equal (nth 4 attr) (nth 5 attr))) | |
40 (Assert (equal (nth 4 attr) (nth 6 attr))) | |
41 (Assert (equal (nth 7 attr) 0))) | |
42 | |
43 ;; Optional ID-FORMAT set -> uid and gid are strings | |
44 (let* ((test-file-name (make-temp-file "dired-test")) | |
45 (attr (file-attributes test-file-name t))) | |
46 (Assert (equal (nth 0 attr) nil)) | |
47 (Assert (equal (nth 1 attr) 1)) | |
48 (Assert (stringp (nth 2 attr))) | |
49 (Assert (equal (nth 2 attr) (user-login-name))) | |
50 (Assert (stringp (nth 3 attr))) | |
51 (Assert (equal (nth 4 attr) (nth 5 attr))) | |
52 (Assert (equal (nth 4 attr) (nth 6 attr))) | |
53 (Assert (equal (nth 7 attr) 0))) |