-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOC] Pretty tables for Kernel#test doc #9751
Conversation
file.c
Outdated
* | <tt>'g'</tt> | Whether the entity's setgid bit is set. | | ||
* | <tt>'G'</tt> | Like <tt>'g'</tt>, but also tests whether the ownership is equal to the caller's. | | ||
* | <tt>'k'</tt> | Whether the entity's sticky bit is set. | | ||
* | <tt>'l'</tt> | Whether the entry is a symbolic link. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use "entity" here for consistency?
* | <tt>'l'</tt> | Whether the entry is a symbolic link. | | |
* | <tt>'l'</tt> | Whether the entity is a symbolic link. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. (I hated to say 'entity' throughout, but prefer it to 'thingy.')
file.c
Outdated
* - Each of these tests operates only on the entity at `path0`, | ||
* and returns `true` or `false`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be clear about the behaviour if the file does not exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
file.c
Outdated
* | <tt>'k'</tt> | Whether the entity's sticky bit is set. | | ||
* | <tt>'l'</tt> | Whether the entry is a symbolic link. | | ||
* | <tt>'o'</tt> | Whether the entity is owned by the caller's effective uid. | | ||
* | <tt>'O'</tt> | Like <tt>'o'</tt>, but uses the real uid/gid (not the effective uid/gid). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this only checks the uid and not the gid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @peterzhu2118 meant 'O'
, not 'o'
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed (I think).
file.c
Outdated
* | ||
* | Character | Test | | ||
* |:---------:|:----- | | ||
* | <tt>'-'</tt> | Whether the entities exist and have the same content. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not just same content, but also needs to have the same timestamps and permissions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs the same i-node, or hard-linked files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've restored the previous term 'identical'; hope that's sufficient.
file.c
Outdated
* |:---------:|:----- | | ||
* | <tt>'-'</tt> | Whether the entities exist and have the same content. | | ||
* | ||
*/s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*/s | |
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
file.c
Outdated
* | <tt>'k'</tt> | Whether the entity's sticky bit is set. | | ||
* | <tt>'l'</tt> | Whether the entry is a symbolic link. | | ||
* | <tt>'o'</tt> | Whether the entity is owned by the caller's effective uid. | | ||
* | <tt>'O'</tt> | Like <tt>'o'</tt>, but uses the real uid/gid (not the effective uid/gid). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @peterzhu2118 meant 'O'
, not 'o'
.
file.c
Outdated
* | <tt>'o'</tt> | Whether the entity is owned by the caller's effective uid/gid. | | ||
* | <tt>'O'</tt> | Like <tt>'o'</tt>, but uses the real uid/gid (not the effective uid/gid). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* | <tt>'o'</tt> | Whether the entity is owned by the caller's effective uid/gid. | | |
* | <tt>'O'</tt> | Like <tt>'o'</tt>, but uses the real uid/gid (not the effective uid/gid). | | |
* | <tt>'o'</tt> | Whether the entity is owned by the caller's effective uid. | | |
* | <tt>'O'</tt> | Like <tt>'o'</tt>, but uses the real uid (not the effective uid). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
file.c
Outdated
* | <tt>'e'</tt> | Whether the entity is an existing entity. | | ||
* | <tt>'f'</tt> | Whether the entity is an existing regular file. | | ||
* | <tt>'g'</tt> | Whether the entity's setgid bit is set. | | ||
* | <tt>'G'</tt> | Like <tt>'g'</tt>, but also tests whether the ownership is equal to the caller's. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
G
is unrelated to g
.
* | <tt>'G'</tt> | Like <tt>'g'</tt>, but also tests whether the ownership is equal to the caller's. | | |
* | <tt>'G'</tt> | Whether the entity's group ownership is equal to the caller's. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
file.c
Outdated
* and returns `true` or `false`; | ||
* for a non-existent entity, returns `false` (does not raise exception): | ||
* | ||
* | Character | Test | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you format the tables using something like http://markdowntable.com/?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
It did not like the alignment chars (:), so needed post-format tune-up.
I could not get that spacing following the tables the way I wanted them.