add primaries to _test#23
Conversation
|
hey many thanks for adding this. yeah ideally we'd merge with tests and docs (the docs are automatically extracted from the comments above the if you can't figure out why |
|
Just create special files (socket, fifo, block, character, not sure which I can add docs and tests. |
|
thanks, looking forward to it |
|
a block device ( a character device ( symlink, file, directory work fine. haven't tested sockets. |
|
added docs and (repetitive) tests. git apparently doesn't track block / character / fifo files, so those have to be created somehow. |
|
ok removed tests for files git doesn't track, the |
|
http://superuser.com/questions/440873/git-unable-add-device-file https://github.com/git/git/blob/master/dir.c#L1028-1036 |
test/test.js
Outdated
There was a problem hiding this comment.
sorry I missed this before - I think that on Unix test -f link returns true (i.e. it's a link and a file)
There was a problem hiding this comment.
I just tested and you're right, although the man page states
-f file True if file exists and is a regular file.
There was a problem hiding this comment.
It seems like a wtf and dilutes the power of this test; to test if a file is really a regular file, you'd have to test both -f and ! -L.
|
fixed |
add further types to test(), -L, -e etc
I started adding tests, but the special files caused the tests for
mvto fail. Also I couldn't figure out how to make a socket.