diff options
author | Burdette Lamar <[email protected]> | 2024-02-01 16:55:13 -0600 |
---|---|---|
committer | <[email protected]> | 2024-02-01 17:55:13 -0500 |
commit | 7b93e65e9f9cb7abfc7e19aff4da9d6e4c32de4b () | |
tree | b216bafe9d876cd6a6e4233e88a47dc130bd28c8 /file.c | |
parent | 8d33be9833dd6a8851948762065db6fab051ad8c (diff) |
[DOC] Pretty tables for Kernel#test doc (#9751)
-rw-r--r-- | file.c | 129 |
1 files changed, 76 insertions, 53 deletions
@@ -5329,60 +5329,83 @@ test_check(int n, int argc, VALUE *argv) #define CHECK(n) test_check((n), argc, argv) /* * call-seq: - * test(cmd, file1 [, file2] ) -> obj - * - * Uses the character +cmd+ to perform various tests on +file1+ (first - * table below) or on +file1+ and +file2+ (second table). - * - * File tests on a single file: - * - * Cmd Returns Meaning - * "A" | Time | Last access time for file1 - * "b" | boolean | True if file1 is a block device - * "c" | boolean | True if file1 is a character device - * "C" | Time | Last change time for file1 - * "d" | boolean | True if file1 exists and is a directory - * "e" | boolean | True if file1 exists - * "f" | boolean | True if file1 exists and is a regular file - * "g" | boolean | True if file1 has the setgid bit set - * "G" | boolean | True if file1 exists and has a group - * | | ownership equal to the caller's group - * "k" | boolean | True if file1 exists and has the sticky bit set - * "l" | boolean | True if file1 exists and is a symbolic link - * "M" | Time | Last modification time for file1 - * "o" | boolean | True if file1 exists and is owned by - * | | the caller's effective uid - * "O" | boolean | True if file1 exists and is owned by - * | | the caller's real uid - * "p" | boolean | True if file1 exists and is a fifo - * "r" | boolean | True if file1 is readable by the effective - * | | uid/gid of the caller - * "R" | boolean | True if file is readable by the real - * | | uid/gid of the caller - * "s" | int/nil | If file1 has nonzero size, return the size, - * | | otherwise return nil - * "S" | boolean | True if file1 exists and is a socket - * "u" | boolean | True if file1 has the setuid bit set - * "w" | boolean | True if file1 exists and is writable by - * | | the effective uid/gid - * "W" | boolean | True if file1 exists and is writable by - * | | the real uid/gid - * "x" | boolean | True if file1 exists and is executable by - * | | the effective uid/gid - * "X" | boolean | True if file1 exists and is executable by - * | | the real uid/gid - * "z" | boolean | True if file1 exists and has a zero length - * - * Tests that take two files: - * - * "-" | boolean | True if file1 and file2 are identical - * "=" | boolean | True if the modification times of file1 - * | | and file2 are equal - * "<" | boolean | True if the modification time of file1 - * | | is prior to that of file2 - * ">" | boolean | True if the modification time of file1 - * | | is after that of file2 */ static VALUE |